Displaying 2 results from an estimated 2 matches for "outtr".
Did you mean:
outer
2005 Aug 31
2
loop
I was wondering why this loop doesn't work!
for (i in 1:k)
fnTr[i] <- function (p) 0.5* sum ( n*log(2*pi) - log(sd(i)^2)
+(logitp(i)-p)^2/sd(i)^2 )
outTr[i]<- nlm (fnTr[i],p=c(10),hessian=TRUE)
minimumTr[i] <- outTr[i]$minimum
valueTr[i] <- outTr[i]$estimate
list (minimumTr[i],valueTr[i])
Has anyone can help me?
Thank you very much
Hathaikan
2005 Aug 02
1
Loop problem
...t[,"Tr"]==1,]
(number of row in each group (1-3) is difference but equal in colume)
fnTr1 <- function (p) sum(
n/2*log(2*pi)+log(1/logitTr1$sd)+1/2*(logitTr1$logitp*logitTr1$logitp-2*logitTr1$logitp*p+p^2)
*1/logitTr1$sd*logitTr1$sd )
(maximum likelyhood function)
outTr1<- nlm (fnTr1,p=c(10),hessian=TRUE)
minimumTr1 <- outTr1$minimum
valueTr1 <- outTr1$estimate
(estimate the value)
The problem is the program couldn't work by using logitTr[i],fnTr[i]
outTr[i],minimumTr[i],value[i] in a loop. The function logitTr[i] is the
data matrix which is not equa...