search for: glm_results

Displaying 2 results from an estimated 2 matches for "glm_results".

Did you mean: gc_results
2008 Sep 11
0
Loop for the convergence of shape parameter
...I] another one is for 1)-3) (making errors). Thank you in advance, Jin [I]for 1) and 2) (working) % data set alpha<-1 verpi<-c(5^alpha,10^alpha-5^alpha,14^alpha-10^alpha,18^alpha-14^alpha) r<-c(1,0,0,1) k<-c(3,2,2,2) x<-c(0.5,0.5,1.0,1.0) % estimate lambda (lambda=beta0+beta1*x) GLM_results <- glm(r/k ~ x, family=binomial(link='cloglog'), offset=log(verpi),weights=k) beta0<-GLM_results$coefficients[[1]] beta1]<-GLM_results$coefficients[[2]] lambda1<-beta0+beta1*x[1] lambda2<-beta0+beta1*x[2] % using lambda, estimate alpha (a=alpha) through ML estimation L<-f...
2008 Sep 12
1
Error in "[<-"(`*tmp*`, i, value = numeric(0)) :
...beta1=rep(0,100) lambda1=rep(0,100) lambda2=rep(0,100) verpi=rep(0,100) L=rep(0,100) alpha[0]=1 i=1 while(i<=100){ repeat{ verpi[i]<-c(5^alpha[i-1],10^alpha[i-1]-5^alpha[i-1],14^alpha[i-1]-10^alpha[i-1],18^alpha[i-1]-14^alpha[i-1]) r<-c(1,0,0,1) k<-c(3,2,2,2) x<-c(0.5,0.5,1.0,1.0) GLM_results <- glm(r/k ~ x, family=binomial(link='cloglog'), offset=log(verpi[i]),weights=k) beta0[i]<-GLM_results$coefficients[[1]] beta1[i]<-GLM_results$coefficients[[2]] lambda1[i]<-beta0[i]+beta1[i]*x[1] lambda2[i]<-beta0[i]+beta1[i]*x[3] L[i]<-function(a){ s1_f1<-(exp(-lambda...