Hi Dennis:
I tried your suggestions and I am getting the following errors:
Error in x$CP1 : $ operator is invalid for atomic vectors
In addition: Warning message:
In sqrt(diag(varcov)) : NaNs produced
?Peter Maclean
Department of Economics
UDSM
----- Original Message ----
From: Dennis Murphy <djmuser at gmail.com>
To: Peter Maclean <pmaclean2011 at yahoo.com>
Sent: Wed, June 22, 2011 11:37:02 PM
Subject: Re: [R] BY GROUP IN GEV
Hi:
I think you need
CP ?<- lapply(MAS, function(x){gev(x$CP1, 100, method = "BFGS",
control ? ? ? ? ? ? ? ? ? ? list(maxit = 500))})
See if that works out.
HTH,
Dennis
On Wed, Jun 22, 2011 at 4:06 PM, Peter Maclean <pmaclean2011 at yahoo.com>
wrote:> I am trying to run gev (general extreme value) function in ?evir? package.
My
> data is divided by state. I am using the following codes but it is not
working.> I will appreciate any help.
>
> #Split data
> MAS <- split(MA, MA$states)
>
> CP ?<- lapply(MAS, function(x){gev(MAS$CP1, 100, method =
"BFGS", control > list(maxit = 500))})
>
> the Error message is:
>
> Error in tapply(data, grouping, max) : arguments must have same length
>
> I know there are also ?by? function,? but I could not figure it out how to
use
> it.
>
> ______________________________________________
> 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.
>