Dear all,
How can I simulate several random variables from a given density function? Assume a bivariate density function x+y defined for x >= 0 & x <= 1 & y >= 0 & y <= x.
The command may work something like this:
clear
set seed 1234
set obs 1000
f = x + y for x >= 0 & x <= 1 & y >= 0 & y <= x
gen x y = some command, denfun(f)
Any ideas would be highly appreciated.
Sincerely,
Alex
Related Posts with Simulate random variables from a given multivariate density function
Patterns for variable in stataHi, I have a dataset with a firm name variable, a year variable ( 2008-2018) and a product variable.…
Relative risk from nlcom different from regression outputHi, I have a similar question to one posed a few years ago in this thread. I am running an adjusted…
-Ipolate- used and now need to fill in constant values before/afterHello, my dataset consists of the following variables: stock_cusip (identifier for every stock), md…
Merge V-Dem with UCDPHi! I am currently working on my bachelors-thesis, where I will measure the impact of voilent confl…
time series: perform the same regression with different variablesHello everyone I have timeseries data containing the returns of an index and the returns of differe…
Subscribe to:
Post Comments (Atom)
0 Response to Simulate random variables from a given multivariate density function
Post a Comment