Hello.
What I had in mind in this (for the bivariate case).
Christophe
library(gumbel)
#simulate random sample
xy <- rgumbel(100, pi)
xy[, 1] <- qnorm(xy[, 1])
xy[, 2] <- qexp(xy[, 2])
#estimate the alpha parameter with canonical maximum likelihood (i.e. assume
ecdf for marginals)
alphahat <- gumbel.CML(xy[, 1], xy[, 2])
eqf <- function(x, marg.number)
as.numeric( quantile(xy[, marg.number], probs=x) )
#check it looks like the standad normal distribution
plot(eqf(0:100/100, 1), 0:100, type="l")
#check it looks like the standad exponential distribution
plot(eqf(0:100/100, 2), 0:100, type="l")
myrand <- function(n)
{
myunif <- rgumbel(n, alphahat)
myunif[, 1] <- eqf(myunif[, 1], 1)
myunif[, 2] <- eqf(myunif[, 2], 2)
myunif
}
par(mfrow=c(1, 2))
plot(xy[,1], xy[,2], main="original sample", xlab="x", ylab="y")
asample <- myrand(100)
plot(asample[,1], asample[,2], main="sample from the fitted parameter",
xlab="x", ylab="y")
2011/1/24 salmajj <[email protected]>
>
> Hi Christophe,
> thanks a lot for your response,
> Actually i do not well understand this point "apply eqf on each marginal" !
> please could you give me more insight?
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Copula-and-Multivariate-distribution-tp3225448p3234744.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
--
Christophe DUTANG
Ph. D. student at ISFA, Lyon, France
[[alternative HTML version deleted]]
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.