Displaying 1 result from an estimated 1 matches for "pri82".
Did you mean:
pri2
2006 Feb 02
2
how to use mle?
>Y
[,1] [,2] [,3]
[1,] 0 1 0
[2,] 0 1 0
[3,] 0 0 1
[4,] 1 0 0
[5,] 0 0 1
[6,] 0 0 1
[7,] 1 0 0
[8,] 1 0 0
[9,] 0 0 1
[10,] 1 0 0
>X
pri82 pan82
1 0 0
2 0 0
3 1 0
4 1 0
5 0 1
6 0 0
7 1 0
8 1 0
9 0 0
10 0 0
>K=2
>J=3
LL <- function(b=rep(0,(J-1)*K)){
B=matrix(c(b,rep(0,K)),ncol=J,nrow=K)
fit <- X%*%B
p<-exp(fit)/rowSums(exp(fit))...