I am trying to create a dataset using a Probit regression model in R, where I have an intercept and three covariates. I first fix a set of coefficients for the three covariates, generate these covariates using standard normal or binomial functions. Then I generate the latent variable Z from a normal distribution centered on my linear function of coefficients and covariates and with variance 1. Then I generate the response variable which takes values 0 or 1, depending on a whether my latent variable Z is below or above 0.
My question: is it necessary to have a variance 1 for Z, the latent variable? If I set this to be some other value, does it mean I will first have to scale Z? See code below for this example. Also, does the cut off value need to be 0? I see that this seems to be a standard assumption but how can I have this different, if possible?
My code is:
nobs <- 5000 # observations
t.beta <- c(1, 1.2, -4, 2) # Coefficients
X <- cbind(rep(1, nobs), rnorm(nobs, -4, sqrt(2.5)), rbinom(nobs, 1, 0.4), rnorm(nobs, 3, sqrt(2)))
Z <- rnorm(nrow(X), (X%*%t.beta), 1)
Y <- as.matrix(ifelse(Z<0, 0, 1))
When I run a standard probit regression on this dataset:
probitModel<- glm(Y~X[,2]+as.factor(X[,3])+X[,4], family=binomial(link="probit"))
summary(probitModel)
In this code, if I change the variance of Z, or use a different cut-off, when I run the probitModel
I do not get the correct coefficients. Why is this so? Is it not possible to use a different cut-off or variance for Z?