[R] R- Fisher Information

David Winsemius dwinsemius at comcast.net
Sun Feb 5 20:47:14 CET 2012


On Feb 5, 2012, at 1:20 PM, Christopher Kelvin wrote:

> Dear All,
> Can you help me, with the code below how do I obtain the fisher  
> information from it.

A modest amount of searching the archives (which is really your  
responsibility):

search.r-project.org/cgi-bin/namazu.cgi?query="fisher 
+ 
information 
"+ 
optim 
&max 
= 
100 
&result 
= 
normal 
&sort 
=score&idxname=functions&idxname=Rhelp08&idxname=Rhelp10&idxname=Rhelp02

... produces:

http://finzi.psych.upenn.edu/R/Rhelp02/archive/72856.html

You should go through the rest of that thread because there is other  
usefull inofrmation in it.

> Is my q<-replicate(1000,x) the right way to do simulation.
> thank you.
>
> x<-rweibull(100,0.8,1.5)
> q<-replicate(1000,x)

I doubt that is what you want. Did you even look at what it produced?

 > x<-rweibull(100,0.8,1.5)
 > q<-replicate(2,x)
 > str(q)
  num [1:100, 1:2] 2.1528 1.8345 5.3473 0.3728 0.0434 ...
 > q[1,]
[1] 2.152798 2.152798


-- 
David

> 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
>
>
>
> Chris Guure
> postgraduate researcher/tutor
> Institute for Mathematical Research
> Universiti Putra Malaysia
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list