Displaying 1 result from an estimated 1 matches for "ylatent1".
Did you mean:
latent
2003 Nov 06
1
for help about R--probit
Not real data. It was gererated randomly. The original codes are the following:
par(mfrow=c(2,1))
n <- 500
#########################
#DATA GENERATING PROCESS#
#########################
x1 <- rnorm(n,0,1)
x2 <- rchisq(n,df=3,ncp=0)-3
sigma <- 1
u1 <- rnorm(n,0,sigma)
ylatent1 <-x1+x2+u1
y1 <- (ylatent1 >=0) # create the binary indicator
#######################
#THE Probit Estimation#
#######################
probit<-glm(y1~x1+x2-1, family=binomial(link=probit))
bp<-probit$coef[2]/probit$coef[1]
bp;
I also tried family=quasibinomial. There seems no error...