PHD Discussions Logo

Ask, Learn and Accelerate in your PhD Research

Question Icon Post Your Answer

Question Icon

6 years ago in Data Simulation By Divya

Univariatevs multivariate data simulation in R language

I want to know about univariate data simulation and multivariate data simulation in R language. Please provide codes for the same. Thank you in advance!

All Answers (4 Answers In All)

By Raghav V Answered 6 years ago

Hello Divya.
In univariate data simulation there are huge number of theoretical distributions. However, these can be simulated using the R functions that are available without additional package. You can consider this example: the function ‘rnorm’ develops random deviates from normal distribution, given to standard and mean deviation.raghav

By Fathima M Answered 6 years ago

I don’t know much about univariate data simulation. But I can help you with multivariate data simulation. In multivariate simulation technique we use ‘mvrnorm’ function from ‘MASS’ package to develop multivariate normal deviates, given correlations and means among the variables. This function can be used for a variety of data structures, including simulating components, simulating multicollinear predictor variables in a regression-style model, simulating canonical correlations, etc.

By Kriya Answered 6 years ago

Check out these websites for the codes
https://stat.ethz.ch/R-manual/R-devel/library/MASS/html/mvrnorm.htmlhttps://little-book-of-r-for-multivariate-analysis.readthedocs.io/en/latest/src/multivariateanalysis.html

By Divya Answered 6 years ago

Sure Kriya. Thank you for the links.

Your Answer