Creating Dataframe

library(VGAM)
## Loading required package: stats4
## Loading required package: splines
df <- data.frame(
  Race = c("Black", "Black", "White", "White"),
  Gender = c("Female", "Male", "Female", "Male"),
  Clerical = c(12, 6, 12, 4),
  Manager = c(27, 12, 19, 20),
  Retail = c(22, 17, 20, 19),
  Sale = c(13, 13, 14, 12),
  Secretary = c(102, 2, 102, 2),
  Supervisor = c(23, 2, 22, 3)
)

Encoding categorical variables

df$Race <- as.factor(df$Race)
df$Gender <- as.factor(df$Gender)

Making multiclass LR model

model_GLM <- vglm(formula = cbind(Manager,Clerical,Retail,Sale,Secretary,Supervisor) ~ Race + Gender, family = multinomial(refLevel="Manager"), data = df)
summary(model_GLM)
## 
## Call:
## vglm(formula = cbind(Manager, Clerical, Retail, Sale, Secretary, 
##     Supervisor) ~ Race + Gender, family = multinomial(refLevel = "Manager"), 
##     data = df)
## 
## Coefficients: 
##               Estimate Std. Error z value Pr(>|z|)    
## (Intercept):1 -0.60980    0.31518  -1.935 0.053022 .  
## (Intercept):2 -0.08471    0.26176  -0.324 0.746218    
## (Intercept):3 -0.52421    0.29560  -1.773 0.076163 .  
## (Intercept):4  1.44046    0.21219   6.788 1.13e-11 ***
## (Intercept):5 -0.06070    0.27622  -0.220 0.826068    
## RaceWhite:1   -0.08817    0.41320  -0.213 0.831022    
## RaceWhite:2   -0.01326    0.32116  -0.041 0.967060    
## RaceWhite:3   -0.01824    0.35922  -0.051 0.959510    
## RaceWhite:4    0.10083    0.28271   0.357 0.721353    
## RaceWhite:5    0.08007    0.37071   0.216 0.828996    
## GenderMale:1  -0.50689    0.44201  -1.147 0.251473    
## GenderMale:2   0.20961    0.32405   0.647 0.517730    
## GenderMale:3   0.28712    0.36134   0.795 0.426847    
## GenderMale:4  -3.57540    0.55528  -6.439 1.20e-10 ***
## GenderMale:5  -1.83947    0.52522  -3.502 0.000461 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Number of linear predictors:  5 
## 
## Names of linear predictors: log(mu[,2]/mu[,1]), log(mu[,3]/mu[,1]), 
## log(mu[,4]/mu[,1]), log(mu[,5]/mu[,1]), log(mu[,6]/mu[,1])
## 
## Residual deviance: 3.1051 on 5 degrees of freedom
## 
## Log-likelihood: -41.2288 on 5 degrees of freedom
## 
## Number of Fisher scoring iterations: 4 
## 
## Warning: Hauck-Donner effect detected in the following estimate(s):
## 'GenderMale:4'
## 
## 
## Reference group is level  1  of the response

what is the estimated odds of job types of choice being clerical rather than manager for white female

Explanation

let’s substitute the given coefficients into the logistic regression equation for the odds of being in the Clerical category rather than the Manager category for White Females.

Given coefficients:

β Intercept:Clerical = -0.60980

β RaceWhite:Clerical = -0.08817

GenderFemale:Clerical = 0 (since female is taken as the base category).

β Intercept:Manager = 0 (as the reference category)

β RaceWhite:Manager = 0

β GenderFemale:Manager = 0 Substitute these values into the formula:

Odds Clerical vs. Manager = exp(-0.60980 - 0.08817 +0) / exp(0+0+0)

Odds Clerical vs. Manager = exp(−0.69797)/exp⁡(0)

Odds Clerical vs. Manager ≈ 0.49759439584 = 0.50

So, based on the given model, the estimated odds of a White Female being in the Clerical category rather than the Manager category are approximately 0.50. This suggests that, according to the model, White Females are estimated to be about 0.50 times as likely to be in the Clerical category compared to the Manager category.