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
foreach num in numlist - reports error (numlist not found) // what's my syntax mistake?Hello, I would like to run the following loop but I get the message: Code: femnumlist not found …
Exporting Mlogit Marginal Effects to ExcelI am trying to export marginal effects output for mlogit into stata. the commands i used are as foll…
Statistical Significance using Burgstahler & Dichev (1997)Hi I want to apply the methodology of Burgstahler & Dichev (1997) to calculate the statistical s…
Merging two data setsI wanted to merge two data sets. There are 99 variables and 315,717 observations (size: 56,513,343) …
Generating predicted probabilities of random effects after melogitHello, My question is on estimating coefficients for random effects in mixed effect models. I am bu…
Subscribe to:
Post Comments (Atom)
0 Response to Simulate random variables from a given multivariate density function
Post a Comment