[R] Fwd: (nonparametric) Copula density estimation
David Winsemius
dwinsemius at comcast.net
Sun Aug 4 05:01:29 CEST 2013
Sent from my iPhone
On Aug 3, 2013, at 8:27 AM, marta Garcia <marta000garcia at gmail.com> wrote:
> ---------- Forwarded message ----------
> From: marta Garcia <marta000garcia at gmail.com>
> Date: 2013/8/3
> Subject: (nonparametric) Copula density estimation
> To: r-help at r-project.org
>
>
> Hello community, sorry for the English, I speak Spanish ...
> I try to run this code
>
>
> install.packages("MASS")
>
> library(MASS)
> install.packages ("evd")
> library(evd)
>
>
> X=lossalae
> U=cbind(rank(X[,1])/(nrow(X)+1),rank(X[,2])/(nrow(X)+1))
> The standard tool to plot nonparametric estimators of densities is to use
> multivariate kernels. We can look at the density using
>
> mat1=kde2d(U[,1],U[,2],n=35)
> install.packages("mgcv")
> library(mgcv)
>
>
> persp(mat1$x,mat1$y,mat1$z,col="green"
> , shade=TRUE,theta=s*5
> , xlab="",ylab="",zlab="",zlim=c(0,7))
>
>
> I get this error
>
> Error in s * 5 : non-numeric argument to binary operator
>
> Can anyone help?
>
The error message looks perfectly sensible: there is no numeric object named 's'.
--
David
>
> I have R 3.0.1
> windows 8
>
> Thanks in advance
>
> [[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