
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: emailtogauravyadav@gmail.com
Bhagavad Gita:  Man is made by his Belief, as He believes, so He is



copula <meeryana@yahoo.com> 
Sent by: r-help-bounces@stat.math.ethz.ch
07/17/2007 12:53 PM

To
r-help@stat.math.ethz.ch
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.

______________________________________________
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 AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}

