[R] Fisher Imformation

Christopher Kelvin chris_kelvin2001 at yahoo.com
Sat Feb 4 15:36:29 CET 2012


Hello,
i have used the code below to estimate the parameters of weibull distribution and i want to obtain the fisher information
by providing the the next code but i receive errors anytime i try to, what do i do?
by the way is my replication correct and is it placed at the right position for replicating x to obtain the estimates
thank you

n=100
library(survival)
x<-rweibull(n,0.8,1.5)
q<-replicate(1000,x)
z<-function(p){
beta<-p[1]
eta<-p[2]
log1<-(n*log(beta)-n*beta*log(eta)+(beta-1)*sum(log(x))-sum((x/eta)^beta))
return(-log1)
}
zz<-optim(c(0.5,0.5),z)
zz

library(MASS)
out <- nlm(z,zz,x=x hessian = TRUE)
fish <- out$hessian
fish
solve(fish)



Chris Guure
postgraduate researcher/tutor
Institute for Mathematical Research
Universiti Putra Malaysia 



More information about the R-help mailing list