[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-finance
Subject:    Re: [R-SIG-Finance] [R-sig-finance] COPULA package in R ~ need help
From:       Andy Zhu <andyzhu35 () yahoo ! com>
Date:       2009-07-21 16:14:57
Message-ID: 3811.98601.qm () web56206 ! mail ! re3 ! yahoo ! com
[Download RAW message or body]

this is to your question about fitCopula with data.frame. Guess from your error \
message, since you have gumbel.cop in your error message (I think this is the one \
used in r help), the codes may be:


x=data.frame(a=u, b=v);
gumbel.cop = gumbelCopula(3, dim=2);
fit.ml = fitCopula(gumbel.cop, x, method="ml");

Of course, you should change the line 2 to have a different copula on your \
distrubtion. This works on my r 2.8.1

Best,


--- On Mon, 7/20/09, bonjourbc9 <multeesl@yahoo.co.uk> wrote:

From: bonjourbc9 <multeesl@yahoo.co.uk>
Subject: [R-SIG-Finance] [R-sig-finance] COPULA package in R ~ need help on error \
                message
To: r-sig-finance@stat.math.ethz.ch
Date: Monday, July 20, 2009, 2:32 PM


Hi folks, I am a newbie to R and I need some advice on an error message while
running the copula package.
Basically I am trying to model a COPULA- GARCH to study the dependence
across international stock returns.

I ran the "fgarch" to fit a AR(1)-GJR GARCH(1,1) ~skewed t to the returns
and obtained the standardised residuals. using the psstd function, I obtain
the marginal cdf for these residuals, this give me a list of u and v. 

What I did next was to convert the u , v into a data matrix as follows;

> V1<-as.vector(u)
> V2<-as.vector(v)
> x<-cbind( V1, V2)

then when i use the formula from copula package >fit.ml <-
fitCopula(gumbel.cop, x, method="ml") , i get this error message ; 

Error in fitCopula.ml(data, copula, start, lower, upper, optim.control,  :
  trying to get slot "dimension" from an object (class "data.frame") that is
not an S4 object

I am at a loss what this error means. Can anyone please advise >?
-- 
View this message in context: \
http://www.nabble.com/COPULA-package-in-R-%7E-need-help-on-error-message-tp24575096p24575096.html
 Sent from the Rmetrics mailing list archive at Nabble.com.

_______________________________________________
R-SIG-Finance@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.



      
	[[alternative HTML version deleted]]



_______________________________________________
R-SIG-Finance@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic