Displaying 15 results from an estimated 15 matches for "normalcopula".
2013 Mar 17
1
Copula package - normalCopula() param order
Hey all,
I'm trying to construct a 7-dimensional normal copula using the copula package. I'd like to supply as parameter a randomly generated correlation matrix (that I'll convert to a vector so I can feed it to the normalCopula function). What order do the pairwise correlations inside that vector have to be in? In other words: What does the normalCopula function "expect"?
Thanks!
2009 Apr 22
1
Copula package
Hi R-users,
I would like to use the copula package.? I? the package plus the mvtnorm and try to run the example given, but I got the following message:
install.packages(repos=NULL,pkgs="c:\\Tinn-R\\copula_0.8-3.zip")
norm.cop <- normalCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = "un")
t.cop <- tCopula(c(0.5, 0.3), dim = 3, dispstr = "toep",
df = 2, df.fixed = TRUE)
## from the wrapper
norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7),
dim = 3, dispstr = "un")
> install.packages(...
2018 Apr 21
0
Error : 'start' contains NA values when fitting frank copula
...stion & answer would be
Q: What is the best fitting 3D copula if you have perfectly
correlated ("rank 1") data?
A: The complete-dependence copula ... which is indeed a boundary case,
hard to imagine you'd encounter for non-artifical data.
Another hint:
> fitCopula(normalCopula(,3), pobs(data))
Call: fitCopula(copula, data = data)
Fit based on "maximum pseudo-likelihood" and 200 3-dimensional observations.
Copula: normalCopula
rho.1
1
The maximized loglikelihood is 3686
Optimization converged
>
-----------
Yes, one could adapt the fitCopula() code to...
2007 Jan 21
1
for loop problem
...column one, bind every column with column 1
Step2: use the new matrix, "test", in the fitCopula package
Step3: store each result in myfit, bind each result to "answer"
Step4: return "answer"
copula_est <- function(z)
{
for(i in 1:length(z[1,]))
{
my.cop <- normalCopula(param = 0.5, dim = 2)
test <- cbind(z[,1],z[,i])
myfit[i] <- fitCopula(test,my.cop, start=0.3)
}
answer <- cbind(myfit[i])
return(answer)
}
Errors received:
Error: object "test" not found
Could my syntax be incorrect, or is it a deeper faulty logic error.
Thank you for...
2006 Oct 13
1
Copula in R 2.4.0
Dear R helper,
does anyone have an idea on why R.2.4.0 draws the surface for the two
command lines below and the next time it renders the error message below
for exactly the same command lines:
> norm.cop <- normalCopula(0.5)
> persp(norm.cop, dcopula)
Error in ceiling(length.out) : Non-numeric argument to mathematical
function.
I will appreciate any help from anyone
thanks,
Dominique K.
2018 Apr 21
2
Error : 'start' contains NA values when fitting frank copula
Hello!
I am trying to fit a copula to some data in R and I get the error mentioned
above. This is the code for a reproducible example -
library(copula)
data = matrix(data=runif(600),nrow=200,ncol=3)
data[,2] = 2*data[,1]
data[,3] = 3*data[,1]
fr_cop = frankCopula(dim=3)
fit_fr_cop = fitCopula(fr_cop,pobs(data),method = "mpl") #Error Here
The error says : Error in fitCopula.ml(copula, u
2010 Mar 13
2
dmvnorm masked by emdbook
...ian copula density
function generated via the copula package. Unfortunately, it appears that
emdbook masks dmvnorm from the package mvtnorm in a way that prohibits
copula from generating the gaussian copula. (Sounds very confusing!) For
example,
> library(copula)
> f<-function(x,y) dcopula(normalCopula(0),c(x,y))
> library(emdbook)
> curve3d(f)
Error in dmvnorm(x, sigma = sigma) : unused argument(s) (sigma = sigma)
Is there no way for me to use those two libraries together?
Thanks,
Dan
[[alternative HTML version deleted]]
2011 Sep 16
1
copula con marginales multivariantes
...a donde las funciones marginales son multivariantes, siguiendo el esquema
del package ''Copula''. Es decir,
Copula(F(x,y), G(w,z)))
En el caso de funciones marginales univariantes, un ejemplo de la normal multivariante quedaria de la siguiente forma,
copulagaussiana<-mvdc(normalCopula(vector_de_correlaciones,dim=3,dispstr ="un"),c(rep("norm",3)),list(param1,param2,param3))
donde ''vector_de_correlaciones'' es un vector con las componentes del triángulo superior de la matriz de correlaciones ordenadas adecuadamente. La función entiende así que...
2008 Jan 05
3
is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)
...;)
[1] FALSE
In contrast, is() does catch parent S4 classes:
> library(copula)
> norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7),
+ dim = 3, dispstr = "un")
> is(norm.cop, "copula")
[1] TRUE
> class(norm.cop)
[1] "normalCopula"
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system = i386, mingw32
status =
major = 2
minor = 6.1
year = 2007
month = 11
day = 26
svn rev = 43537
language = R
version.string = R version 2.6.1 (2007-11-26)
Windows...
2007 Jan 18
0
fitCopula method in R
--
Hello,
I am attempting to fit monthly stock returns to possible copula functions using
the copula package in R. Below is my code (mat2 is a 2x119 matrix of the two
stock returns):
my.cop <- normalCopula(param=.3, dim = 2, dispstr = "un")
myfit <- fitCopula(mat2,my.cop, start=.65, optim.control= list(NULL), method =
"BFGS")
myfit
Unfortunately, I continue to receive this error:
Error in optim(start, loglikCopula, method = method, copula = copula, :
initial value in...
2007 Feb 01
0
traverse through many columns of a matrix in a function
...,1]), etc.
Unfortunately, my code below only binds z[,1] and m_index[,1] and return the
same result 14 times.
Any ideas on how to implement my idea would be greatly appreciated. Also,
why am I getting the same result 14 times, shouldn't it be 15 since there
are 15 columns in z?
my.cop <- normalCopula(param = 0.5, dim = 2)
answer <- apply(z[,-1], 2, function(m_index[,1],my.cop)
fitCopula(cbind(z[,-1], m_index[,1]), my.cop, start=0.3), my.cop = my.cop)
Thanks for help.
Adam (aat)
--
View this message in context: http://www.nabble.com/traverse-through-many-columns-of-a-matrix-in-a-function...
2006 Oct 10
2
copula
Dear R-helper,
Is there any thing that I am doing wrong in the following codes:
> norm.cop <- normalCopula(0.5)
> persp(norm.cop, dcopula)
The last command produces what follows
Error in persp(x, y, z, xlim, ylim, zlim, theta, phi, r, d, scale,
expand, :
invalid 'x' argument
In addition: Warning messages:
1: no non-missing arguments to min; returning Inf
2: no non-missing argument...
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
...essage-----
From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be]
Sent: May 12, 2006 4:35 PM
To: Chaouch, Aziz
Subject: RE: [R] Maximum likelihood estimate of bivariate
vonmises-weibulldistribution
look at the following code:
library(copula)
par(mfrow = c(2, 2))
x <- mvdc(normalCopula(sin(0.5 * pi /2)), c("norm", "norm"),
list(list(mean = 0, sd = 1), list(mean = 0, sd = 1))) contour(x, dmvdc,
xlim = c(-2.7, 2.7), ylim = c(-2.7, 2.7))
x <- mvdc(frankCopula(5.736276), c("norm", "norm"), list(list(mean = 0,
sd = 1), list(mean = 0, sd = 1)...
2008 Aug 11
2
generating a random signal with a known correlation
Hi,
How can I generate a random signal that's correlated with a given signal at
a given correlation (say 0.7)?
I've been looking at rmvnorm etc but don't seem to figure it out. Thanks
-----
Yasir H. Kaheil
Columbia University
--
View this message in context: http://www.nabble.com/generating-a-random-signal-with-a-known-correlation-tp18932541p18932541.html
Sent from the R help
2007 Jul 16
3
R and Copula
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