search for: latentz

Displaying 1 result from an estimated 1 matches for "latentz".

Did you mean: latent
2003 Sep 08
1
Probit and optim in R
...point. Luke Keele Dept of Political Science UNC-Chapel Hill -------------- next part -------------- ## Probit Code For Simulation #Define empty matrix na <- matrix(NA,10,3) #Set counter and start loop j <- 1 while (j < 11){ #Simulate Data x1 <- rnorm(1000) x2 <- rnorm(1000) latentz <- 1.0 + 2.0 * x1 - 3.0 * x2 + rnorm(1000) y <- latentz y[latentz < 1] <- 0 y[latentz >=1] <- 1 #Option export of data to check estimates in STATA #SimProbit <- data.frame(y, x1, x2) #write.table(SimProbit, 'a:/SimProbit') x <- cbind(1, x1 ,x2) #Define Likelihood...