Re: [R] Generating bivariate or multivariate data with known parameter values

From: Dimitrios Rizopoulos <Dimitris.Rizopoulos_at_med.kuleuven.be>
Date: Sun 08 Oct 2006 - 18:35:05 GMT

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@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@education.wisc.edu
> Web: http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm
> Phone: 608-262-0836
> Fax: 608-262-0843
>
> ______________________________________________
> R-help@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



R-help@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. Received on Mon Oct 09 04:39:14 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 08 Oct 2006 - 19:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.