[R] Sampling two exponentials

Zhang Yanwei - Princeton-MRAm YZhang at munichreamerica.com
Thu Jul 31 19:50:21 CEST 2008


I am trying to do this using the copula library and find a possible way out.

library(copula)
x=mvdc(claytonCopula(.75),c("exp","exp"),list(list(rate=1),list(rate=2)))
x.sample=rmvdc(x,100)

The above code gives a sample with two marginal exponential ditributions. But what does the first argument claytonCopula(.75) mean? How can one specify the correlation between these two marginals? Thanks

Sincerely,
Yanwei Zhang
Department of Actuarial Research and Modeling
Munich Re America
Tel: 609-275-2176
Email: yzhang at munichreamerica.com

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Zhang Yanwei - Princeton-MRAm
Sent: Wednesday, July 30, 2008 5:48 PM
To: r-help at r-project.org
Subject: [R] Sampling two exponentials

Hi all,
  I am going to sample two variables from two exponential distributions, but I want to specify a covariance structure between these two variables. Is there any way to do it in R? Or is there a "Multivariate Exponential" thing corresponding to the multivariate normal? Thanks in advance.

Sincerely,
Yanwei Zhang
Department of Actuarial Research and Modeling Munich Re America
Tel: 609-275-2176
Email: yzhang at munichreamerica.com<mailto:yzhang at munichreamerica.com>


        [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org 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.



More information about the R-help mailing list