hi
see the code below i hope this will make your understanding of copulas
better
this code plots two normal distribution and their joint distribution
N[0,2] & N[0,4]
HTH
######################code################################
library("copula")
###################copy in two parts in R#################
##################PART A##################################
## construct a bivariate distribution whose marginals
## are normal and Normal respectively, coupled
## together via a normal copula
op <- par(mfrow = c(2, 2), # 2 x 2 pictures on one plot
pty = "s") # square plotting region,
# independent of device size
x <- mvdc(normalCopula(0.75), c("norm", "norm"),
list(list(mean = 0, sd =2),list(mean = 0, sd =4)))
x.samp <- rmvdc(x, 10000)
par(mfrow=c(2,3))
hist(x.samp[,1],xlab="Normal")
hist(x.samp[,2],xlab="Normal")
plot(x.samp[,2],x.samp[,1],pch=21,xlab="Normal",ylab="Normal")
plot(dmvdc(x, x.samp))
plot(pmvdc(x, x.samp))
## At end of plotting, reset to previous settings:
###########################PART B#######################
par(op)
for (i in seq(1:360)){
persp(x, dmvdc, xlim = c(-4, 4), ylim=c(0, 1),theta=i)
}
Regards,
Gaurav Yadav
+++++++++++
Assistant Manager, CCIL, Mumbai (India)
Mob: +919821286118 Email: [EMAIL PROTECTED]
Bhagavad Gita: Man is made by his Belief, as He believes, so He is
copula <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
07/17/2007 12:53 PM
To
[email protected]
cc
Subject
Re: [R] R and Copula
it would be great when somebody will help me
thanks
copula wrote:
>
> hi,
> first I want to say that I'm new here, and new with copula and R.
>
> That is the reason why I'm writing, if somebody can help me.
>
> I have to make an example of Copula.
> On internet I've found this forum and that copula can calculate with R.
>
> Can somebody help me with the thing how can I start and where can read
> about these stuffs.
>
> Thank to all who can help!
>
>
>
>
--
View this message in context:
http://www.nabble.com/R-and-Copula-tf4085867.html#a11644534
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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 AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}
______________________________________________
[email protected] 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.