search for: rubem

Displaying 2 results from an estimated 2 matches for "rubem".

Did you mean: ruben
2012 Jun 19
1
Error when trying to update cpglm model
Dear all, I've been having problems running update() to re-fit a cpglm model inside a function (as in the code below). The solution is probably simple, but I'm stuck. If anyone could help, I'd greatly appreciate it. Regards, Rubem ## R code library(cplm) ## Data simulation period<-factor(1:4)                        herd<-factor(1:50)   dat<-expand.grid(period=period,herd=herd)                       beta<-c(-.3,1.7,2.5,3.4)                  X<-model.matrix(~period,dat)               mu<-as.vector(exp...
2012 May 23
1
Error message from optim
Dear list, When running the script below, the optim function returns the message 'Error in function (par) : could not find function "fn"'. I've re-read the code a few times and just can't figure out why it's happening. Any help/suggestion is appreciated. Regards, Rubem ## R script library(tweedie) period<-factor(1:4) herd<-factor(1:10) dat<-expand.grid(period=period,herd=herd) beta<-c(-.3,1.7,2.5,3.4) x<-model.matrix(~period,dat) b<-rnorm(length(levels(dat$herd)),sd=.3)   z<-model.matrix(~-1+herd,dat)              mu<-as.vector(e...