David Kaplan
2006-Oct-08 18:12 UTC
[R] Generating bivariate or multivariate data with known parameter values
Greetings, I'm interested in generating data from various bivariate or mulitivariate distributions (e.g. gamma, t, etc), where I can specify the parameter values, including the correlations among the variables. I haven't been able to dig anything up on the faq, but I probably missed something. A nudge in the right direction would be appreciated. David -- =======================================================================David Kaplan, Ph.D. Professor Department of Educational Psychology University of Wisconsin - Madison Educational Sciences, Room 1061 1025 W. Johnson Street Madison, WI 53706 email: dkaplan at education.wisc.edu Web: http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm Phone: 608-262-0836 Fax: 608-262-0843
Dimitrios Rizopoulos
2006-Oct-08 18:35 UTC
[R] Generating bivariate or multivariate data with known parameter values
you can do that using the copula package, e.g., library(copula) bivGamma <- mvdc(claytonCopula(2), c("gamma", "gamma"), list(list(shape = 1, rate = 2), list(shape = 2, rate = 1))) dat <- rmvdc(bivGamma, 1000) regarding correlation, the Clayton copula with alpha = 2 gives Kendall's tau = 0.5, i.e., cor(dat, method = "kendall") I hope it helps. Best, Dimitris ---- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm Quoting David Kaplan <dkaplan at education.wisc.edu>:> Greetings, > > I'm interested in generating data from various bivariate or > mulitivariate distributions (e.g. gamma, t, etc), where I can specify > the parameter values, including the correlations among the variables. I > haven't been able to dig anything up on the faq, but I probably missed > something. A nudge in the right direction would be appreciated. > > David > > > -- > =======================================================================> David Kaplan, Ph.D. > Professor > Department of Educational Psychology > University of Wisconsin - Madison > Educational Sciences, Room 1061 > 1025 W. Johnson Street > Madison, WI 53706 > > email: dkaplan at education.wisc.edu > Web: http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm > Phone: 608-262-0836 > Fax: 608-262-0843 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
thelozee_x
2007-Jul-12 13:45 UTC
[R] Generating bivariate or multivariate data with known parameter values
David Kaplan-2 wrote:> > Greetings, > > I'm interested in generating data from various bivariate or > mulitivariate distributions (e.g. gamma, t, etc), where I can specify > the parameter values, including the correlations among the variables. I > haven't been able to dig anything up on the faq, but I probably missed > something. A nudge in the right direction would be appreciated. > > David > > > -- > =======================================================================> David Kaplan, Ph.D. > Professor > Department of Educational Psychology > University of Wisconsin - Madison > Educational Sciences, Room 1061 > 1025 W. Johnson Street > Madison, WI 53706 > > email: dkaplan at education.wisc.edu > Web: http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm > Phone: 608-262-0836 > Fax: 608-262-0843 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >i'm interesting to use multivariate gamma distributed gamma data, in copula packages, you say that it can generate bivariate gamma distribution, i have try this and succes. my question, 1. are the copula can be used for generating multivariate gamma distributed gamma data? 2. when i try to generating bivariate gamma, can i set the correlation? for knowing, i have try many combination of parameters, but the result is taht correlation value is about 0.5. thankyou very much for your responses. dian -- View this message in context: http://www.nabble.com/-R--Generating-bivariate-or-multivariate-data-with-known-parameter-values-tf2405919.html#a11560289 Sent from the R help mailing list archive at Nabble.com.