For teaching purposes, I need to generate random datasets of correlated random variables with different distributions. I have tried corr2data in Stata but it will not allow me to specify max and min values of the variables to be generated, just means, sd's and the covariance matrix. Therefore, I need to do messy adjustments after generation of the data. Various other details annoy me with corr2data. Is there a simpler way of doing this with MATLAB? I am not as familiar with this software as I am with Stata.
how to generate a dataset of correlated variables with different distributions?
1.6k Views Asked by user3266683 At
1
There are 1 best solutions below
Related Questions in MATLAB
- How to open and read video stream in Matlab
- Interpolation and replace zeroes
- How can I fix my code to do line by line conditional statements in Matlab
- matlab crash during acquisition of pointgrey images
- Calling text file
- Apply gaussian filter on text
- re-plotting of data on same GUI axes in matlab
- Issue with nume1 in MATLAB
- Multiply two variables in Matlab with vpa - high precision
- ODE - Solving Parameter Dependent on Variable [Matlab]
- Need help in detecting multiple blobs
- How does TIC TOC in matlab work?
- Image based steganography that survives resizing?
- lowering computaional cost in finding the location of minimum distance
- FFT Filtering of signal
Related Questions in DATASET
- Is there a data format lighter than json?
- How to remove datatable from dataset?
- fetch data from web service to dataset in Delphi
- Find All Rows in DataTable Where Column Value is NOT Unique Using Linq Query
- Binding DataGirdComboBoxColumn to DataSet doesn't work
- Visual Studio Professional 2012 says dataset is not a member of my form
- Fastest way to query SQL Server CE database file in Windows Mobile 6.5?
- to_char(Column_name) what would be the column name in dataset
- A column named 'Prize' already belongs to this DataTable
- InvalidCastException when trying to make a list from xml file
- changing the order of records in dataset
- pybrain datasets insert tuple
- c# Tableadapter fails to update through odbc
- how to find out if a specific table exists in a dataset
- .Dat file to dataset
Related Questions in STATA
- Backwards stepwise regression approach in Stata 13
- Stata: Retrieve variable label in a macro
- When was a file used by another program
- Rollreg and missing values in panel data
- Replace values within group
- Using varlist multiple times in Stata
- How do I stop SAS from adding an extra empty byte to every string variable when I use PROC EXPORT?
- Line chart with means and CIs in Stata
- Pairwise correlations over rolling periods ignoring double calculations
- How can I merge stacked, longitudinal datasets with string variable ID's in Stata?
- Drop random effects parameters from output table in Stata
- Adding across years
- how to: Separate a continuous variable by % proportions?
- How to loop through specific string values of a variable in Stata?
- read Excel cells into Stata global as variables
Related Questions in CORRELATED
- Will a correlated MQGET clear out other expired messages on a queue?
- How to analyse a non-inferiority trial using GEE in R?
- Access SQL UPDATE with a correlated sub query on a single table
- How to do diagnostic analysis with the systemfit package?
- Generating correlated vectors (X,Y) , whereby rho = f(x) 'hockey stick'
- SQL subquery in SELECT clause
- Unfold results of an Oracle query based on value and add a column with incrementing number per unfolding
- Decorrelating a large number of data using numpy
- Is there PCA with Promax rotation in Python?
- Oracle correlated subquery, filter results
- Why are tha standard error of my coefficients the same?
- how to generate a dataset of correlated variables with different distributions?
- Mersenne twister: limitations used in agent based models
- Reference of similar functions between Programming Languages
- R packages to analyse spatiotemporal related data & separate effect of correlated predictors on response variable
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you have access to Statistics Toolbox as well as MATLAB, you can use the copula functionality to do this fairly easily. Using a copula, you can specify the marginal distributions of each variable, and a correlation structure between the variables.
You can then generate random numbers from the copula, fit it to data etc. as well.
See in the MATLAB documentation:
Copulas: Generate Correlated Samples