0

I am facing following issue: I want to calculate the α and β from the following probit model in R, which is defined as:

Probability = F(α + β sprd )

where sprd denotes the explanatory variable, α and β are constants, F is the cumulative normal distribution function.

I can calculate probabilities for the entire dataset, the coeffcients (see code below) etc. but I do not know how to get the constant α and β.

The purpose is to determine the Spread in Excel that corresponds to a certain probability. E.g: Which Spread corresponds to 50% etc.

Thank you in advance!

Probit model coefficients

probit<- glm(Y ~ X, family=binomial (link="probit"))
summary(probit)

Call:
glm(formula = Y ~ X, family = binomial(link = "probit"))

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.4614  -0.6470  -0.3915  -0.2168   2.5730  

Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept) -0.3566755  0.0883634  -4.036 5.43e-05 ***
X           -0.0058377  0.0007064  -8.264  < 2e-16 ***
John
  • 1
  • 1

2 Answers2

0

From the help("glm") page you can see that the object returns a value named coefficients.

An object of class "glm" is a list containing at least the following components:

coefficients a named vector of coefficients

So after you call glm() that object will be a list, and you can access each element using $name_element.

Reproducible example (not a Probit model, but it's the same):

counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
d.AD <- data.frame(treatment, outcome, counts)

# fit model
glm.D93 <- glm(counts ~ outcome + treatment, family = poisson())

Now glm.D93$coefficients will print the vector with all the coefficients:

glm.D93$coefficients 

 # (Intercept)      outcome2      outcome3    treatment2    treatment3 
 #3.044522e+00 -4.542553e-01 -2.929871e-01  1.337909e-15  1.421085e-15 

You can assign that and access each individually:

coef <- glm.D93$coefficients
coef[1] # your alpha
#(Intercept) 
#   3.044522 
coef[2] # your beta
#  outcome2 
#-0.4542553 
RLave
  • 8,144
  • 3
  • 21
  • 37
0

I've seen in your deleted post that you are not convinced by @RLave's answer. Here are some simulations to convince you:

# (large) sample size
n <- 10000
# covariate
x <- (1:n)/n
# parameters
alpha <- -1
beta <- 1
# simulated data
set.seed(666)
y <- rbinom(n, 1, prob = pnorm(alpha + beta*x))
# fit the probit model
probit <- glm(y ~ x, family = binomial(link="probit"))
# get estimated parameters - very close to the true parameters -1 and 1
coef(probit)
# (Intercept)           x 
#   -1.004236    1.029523 

The estimated parameters are given by coef(probit), or probit$coefficients.

Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225