?=================================================================== ? Predicted values for a tobit variable estimated with sample = ? selection. = ? = ? User must define the data for the tobit part of the model with: = ? = ? NAMELIST ; X = ... $ = ? = ? Tobit dependent variable is Y. Change the following line = ? = ? CREATE ; Y = the dependent variable $ = ? = ? User must define the data for the probit part of the model with: = ? = ? NAMELIST ; V = ... $ = ? = ? Probit dependent variable is Z. Change the following line = ? = ? CREATE ; Z = the dependent variable $ = ?=================================================================== PROBIT ; LHS = z ; RHS = V ; Hold $ SELECT ; LHS = y ; RHS = X ; Tobit ; MLE $ ? ? Do the following only if data for the predictions are unavailable ? for the limit (z=0) observations. ? REJECT ; z = 0 $ ? ? Size and location of parameter vectors in B ? CALCULATE ; Ka = col(V) ; Kb = col(X) ; jb = Ka+1 $ ? ? Extract subvectors of saved parameter vector. ? Scalars S and RHO already contain å(î) and þ needed below. ? MATRIX ; alpha = B( 1 : Ka) ; beta = B( jb : Kb ) $ ? ? Simplifies bivariate normal calculation ? CALCULATE ; delta = -1 / sqr ( 1 - rho^2 ) $ ? ? Variables for bivariate normal ? CREATE ; h = -dot(beta,x)/s ; mh=-h ; k = -dot(alpha,v) ; mk=-k $ NAMELIST ; hk=mh,mk $ ? ? Conditional mean function ? CREATE ; phi2=bvn(hk,rho) ; ey=s*mh*phi2 + s*(n01(h)*phi(delta*(k-rho*h)) + rho*n01(k)*phi(delta*(h-rho*k)))$ ? ? Result can now be inspected or saved in a file ? LIST ; ey $