R : Copyright 2001, The R Development Core Team Version 1.3.1 (2001-08-31) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type `license()' or `licence()' for distribution details. R is a collaborative project with many contributors. Type `contributors()' for more information. Type `demo()' for some demos, `help()' for on-line help, or `help.start()' for a HTML browser interface to help. Type `q()' to quit R. > x <- rnorm(100) > y <- 1 + x + rnorm(100) > y <- as.integer(y<0) > probitfit <- glm(y ~ x, family = binomial(link = probit)) > summary(probitfit) Call: glm(formula = y ~ x, family = binomial(link = probit)) Deviance Residuals: Min 1Q Median 3Q Max -1.6524 -0.5450 -0.1745 0.2880 2.4879 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.2301 0.2413 -5.098 3.43e-07 *** x -1.8627 0.3689 -5.050 4.42e-07 *** --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 116.652 on 99 degrees of freedom Residual deviance: 68.169 on 98 degrees of freedom AIC: 72.169 Number of Fisher Scoring iterations: 5 > index <- probitfit$coef[1] + probitfit$coef[2]*x > invmills <- dnorm(index)/pnorm(index) >