Dear i optimized the gama and beta value using MLE via simmulation of birnbaum saunders distribution. if i run this code it generate very small value of beta. Could any one help me in this regard. i use gbs package to generate data.
gama=1.0 beta=1.3 n=25 iterCount=1000 for(i in 1:iterCount){ x<-rgbs(n,gama,beta) P<-function(theta,x){ n<-length(x) gama<-theta[1] beta<-theta[2] -n*log(5.013)+ n*(theta[1])^-2-n*log(theta[1])-n/2*log(theta[2])+ sum(log(theta[2]+x)-0.5/theta[1]^2*(x/theta[2]+theta[2]/x))}} P.out<-optim(theta<-c(gama,beta),ll.wd,x=x,method = "Nelder-Mead",hessian=FALSE) gamhat<-P.out$par[1] betahat<-P.out$par[2] [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.