Skip to content

Fisher Imformation

2 messages · Christopher Kelvin, Uwe Ligges

#
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?
#
On 04.02.2012 15:36, Christopher Kelvin wrote:
Syntactically wrong: A comma is missing.
Meaningless:  zz is an object returned by optim. You cannot use such an 
object as starting value for the opimization of your z function.

Uwe Ligges