Package: SimMultiCorrData 0.2.2
SimMultiCorrData: Simulation of Correlated Data with Multiple Variable Types
Generate continuous (normal or non-normal), binary, ordinal, and count (Poisson or Negative Binomial) variables with a specified correlation matrix. It can also produce a single continuous variable. This package can be used to simulate data sets that mimic real-world situations (i.e. clinical or genetic data sets, plasmodes). All variables are generated from standard normal variables with an imposed intermediate correlation matrix. Continuous variables are simulated by specifying mean, variance, skewness, standardized kurtosis, and fifth and sixth standardized cumulants using either Fleishman's third-order (<doi:10.1007/BF02293811>) or Headrick's fifth-order (<doi:10.1016/S0167-9473(02)00072-5>) polynomial transformation. Binary and ordinal variables are simulated using a modification of the ordsample() function from 'GenOrd'. Count variables are simulated using the inverse cdf method. There are two simulation pathways which differ primarily according to the calculation of the intermediate correlation matrix. In Correlation Method 1, the intercorrelations involving count variables are determined using a simulation based, logarithmic correlation correction (adapting Yahav and Shmueli's 2012 method, <doi:10.1002/asmb.901>). In Correlation Method 2, the count variables are treated as ordinal (adapting Barbiero and Ferrari's 2015 modification of GenOrd, <doi:10.1002/asmb.2072>). There is an optional error loop that corrects the final correlation matrix to be within a user-specified precision value of the target matrix. The package also includes functions to calculate standardized cumulants for theoretical distributions or from real data sets, check if a target correlation matrix is within the possible correlation bounds (given the distributions of the simulated variables), summarize results (numerically or graphically), to verify valid power method pdfs, and to calculate lower standardized kurtosis bounds.
Authors:
SimMultiCorrData_0.2.2.tar.gz
SimMultiCorrData_0.2.2.zip(r-4.5)SimMultiCorrData_0.2.2.zip(r-4.4)SimMultiCorrData_0.2.2.zip(r-4.3)
SimMultiCorrData_0.2.2.tgz(r-4.4-any)SimMultiCorrData_0.2.2.tgz(r-4.3-any)
SimMultiCorrData_0.2.2.tar.gz(r-4.5-noble)SimMultiCorrData_0.2.2.tar.gz(r-4.4-noble)
SimMultiCorrData_0.2.2.tgz(r-4.4-emscripten)SimMultiCorrData_0.2.2.tgz(r-4.3-emscripten)
SimMultiCorrData.pdf |SimMultiCorrData.html✨
SimMultiCorrData/json (API)
NEWS
# Install 'SimMultiCorrData' in R: |
install.packages('SimMultiCorrData', repos = c('https://afialkowski.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/afialkowski/simmulticorrdata/issues
- H_params - Parameters for Examples of Constants Calculated by Headrick's Fifth-Order Polynomial Transformation
- Headrick.dist - Examples of Constants Calculated by Headrick's Fifth-Order Polynomial Transformation
Last updated 6 years agofrom:89bd4e5a3f. Checks:OK: 3 NOTE: 4. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Oct 27 2024 |
R-4.5-win | OK | Oct 27 2024 |
R-4.5-linux | OK | Oct 27 2024 |
R-4.4-win | NOTE | Oct 27 2024 |
R-4.4-mac | NOTE | Oct 27 2024 |
R-4.3-win | NOTE | Oct 27 2024 |
R-4.3-mac | NOTE | Oct 27 2024 |
Exports:calc_final_corrcalc_fisherkcalc_lower_skurtcalc_momentscalc_theorycdf_probchat_nbchat_poisdenom_corr_caterror_looperror_varsfind_constantsfindintercorrfindintercorr_cat_nbfindintercorr_cat_poisfindintercorr_contfindintercorr_cont_catfindintercorr_cont_nbfindintercorr_cont_nb2findintercorr_cont_poisfindintercorr_cont_pois2findintercorr_nbfindintercorr_poisfindintercorr_pois_nbfindintercorr2fleishfleish_Hessianfleish_skurt_checkintercorr_fleishintercorr_polymax_count_supportnonnormvar1ordnormpdf_checkplot_cdfplot_pdf_extplot_pdf_theoryplot_sim_cdfplot_sim_extplot_sim_pdf_extplot_sim_pdf_theoryplot_sim_theorypolypoly_skurt_checkpower_norm_corrrcorrvarrcorrvar2separate_rhosim_cdf_probstats_pdfvalid_corrvalid_corr2var_cat
Dependencies:assertthatBBclicolorspacefansifarverGenOrdggplot2glueGPArotationgtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmnormtmunsellmvtnormnleqslvnlmepillarpkgconfigpsychquadprogR6RColorBrewerrlangscalestibbletriangleutf8vctrsVGAMviridisLitewithr
Benefits of SimMultiCorrData and Comparison to Other Packages
Rendered frombenefits.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22
Comparison of Correlation Method 1 and Correlation Method 2
Rendered frommethod_comp.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22
Comparison of Simulated Distribution to Theoretical Distribution or Empirical Data
Rendered fromdist_comp.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22
Functions by Topic
Rendered fromfunctions.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22
Overall Workflow for Data Simulation
Rendered fromworkflow.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22
Overview of Error Loop
Rendered fromerrorloop.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-11-05
Started: 2017-06-22
Using the Sixth Cumulant Correction to Find Valid Power Method Pdfs
Rendered fromsixth_validpdf.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22
Variable Types
Rendered fromvariable_types.Rmd
usingknitr::rmarkdown
on Oct 27 2024.Last update: 2017-10-25
Started: 2017-06-22