[R] parametric bootstrap

From: laila khalfan <byblus412_at_hotmail.com>
Date: Mon, 28 Jul 2008 12:32:08 +0000

I am using the boot function in boot package. I am facing a problem in getting the values of bias and st.error in the output. r<-36
theta11<-exp(1) # (=2.718282)
theta21<-exp(.5) #( =1.648721)
m0<- function(Ti,Tj) #a function that generates the MLestimates {
loglik<-function(ti,tj,alpha,theta1,theta2){ -1*( log(n)-log(n1)-log(r-n1)-r*lgamma(alpha)-alpha*n1*log(theta1)-alpha*(r-n1)*log(theta2)+(alpha-1) *sum(log(Ti))+(alpha-1)*sum(log(Tj-tau+(theta2/theta1)*tau))-(1/theta1)*sum(Ti)-
V<-mle2(minuslogl = loglik, start = list(alpha= 2,theta1= 11, theta2= 3), data = list(size = 20))
sample1<-function(n,r,tau,shape,theta1,theta2) #the function that generate the sample { U<-runif(n)
F1tau<- pgamma((tau/theta1),shape,1)

n1<-sum(Us<- boot(data=c(Ti,Tj) , statistic= func1 , R=1000,sim='parametric', ran.gen=func2,
mle= m0(Ti,Tj) )
boot.ci(bootobject, conf=.90, type= 'bca')
Thank you and take care.

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. Received on Mon 28 Jul 2008 - 12:42:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jul 2008 - 13:32:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive