search for: verpi

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

Did you mean: veri
2008 Sep 12
1
Error in "[<-"(`*tmp*`, i, value = numeric(0)) :
...alpha=0, estimate lambda (estimate beta0 and beta1 via GLM) 2) with lambda, estimate alpha via ML estimation 3) with updated alpha, replicate 1) and 2) until alpha is converged to a value My source code is alpha=rep(1,100) beta0=rep(0,100) 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='clo...
2008 Sep 11
0
Loop for the convergence of shape parameter
...roblems with the loop. It produced some errors. Is there someone to help me to figure this problem for the loop. Here are two codes: [I] one is for 1) and 2) (working), and [II] 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$coeffic...