Displaying 2 results from an estimated 2 matches for "thmu".
Did you mean:
tamu
2008 Dec 04
0
integration within maximum likelihood
...> setwd("C:/Users/Angelo/Documents/PhD/Montecarlo TVI")
> DATA<-read.table("Data.csv",header=TRUE,sep=",")
> 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<-...
2009 Mar 23
0
Problems with adapt
...-----------------------------------------------------------------------------
DATA<-read.table("Data.csv",header=TRUE,sep=",")
library(adapt)
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]
alfz1<-theta[8]
alfz2<-theta[9]
alfc<-theta[10]
alf<-theta[11]
r<- 1
s<- 1
n<-2000
lik<-numeric(n)
int<-numeric(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...