Displaying 2 results from an estimated 2 matches for "z_a3".
Did you mean:
__a3
2008 Dec 04
0
integration within maximum likelihood
...)
> mnl.lik<-function(theta,y){
+ th1<-theta[1]
+ th2<-theta[2]
+ tha<-theta[3]
+ thb<-theta[4]
+ thc<-theta[5]
+ thp<-theta[6]
+ thmu<-theta[7]
+ alfz<-theta[8]
+ alfp<-theta[9]
+ mu1<- alfz*y$z_a1 + alfp*y$p1
+ mu2<- alfz*y$z_a2 + alfp*y$p2
+ mu3<- alfz*y$z_a3 + alfp*y$p3
+ U1<- th1 +tha*y$a1 +thb*y$b1 +thc*y$c1 +thp*y$p1 +thmu*mu1
+ U2<- th2 +tha*y$a2 +thb*y$b2 +thc*y$c2 +thp*y$p2 +thmu*mu2
+ U3<- +tha*y$a3 +thb*y$b3 +thc*y$c3 +thp*y$p3 +thmu*mu3
+ Usum<- (exp(U1)+exp(U2)+exp(U3))
+ arg1<- function(mu1) {(exp(U1)/Usum)*dnorm(mu1-...
2009 Mar 23
0
Problems with adapt
...umeric(n)
v<- numeric(2)
for (i in 1:n) { #Beggin Loop
lstarpre<- function(v){ #This is the fuction to be integrated
e1<-y$p1[i]-alfz1*y$z_a1[i] - alfz2*y$z_b1[i] -alfc*y$c1[i] -alf
e2<-y$p2[i]-alfz1*y$z_a2[i] - alfz2*y$z_b2[i] -alfc*y$c2[i] -alf
e3<-y$p3[i]-alfz1*y$z_a3[i] - alfz2*y$z_b3[i] -alfc*y$c3[i] -alf
U1<- (th1 +tha*y$a1[i] +thb*y$b1[i] +thc*y$c1[i] +thp*y$p1[i]
+thmu*(e1[i]+v[1]))
U2<- (th2 +tha*y$a2[i] +thb*y$b2[i] +thc*y$c2[i] +thp*y$p2[i]
+thmu*(e2[i]+v[2]))
U3<- ( +tha*y$a3[i] +thb*y$b3[i] +thc*y$c3[i] +thp*y$p3[i] +thmu*(e3[i]))
Pni&...