-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04_multinomial.R
39 lines (36 loc) · 2.3 KB
/
04_multinomial.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#===============================================================================
# 29/07/2024
# Multinomial Regressions
# Diverse Pathways to Permanent Childlessness in Singapore
# Yanwen Wang, [email protected]
#===============================================================================
# Multinomial Regressions -------------------------------------------------
# Models
mods <- list(
mod1 <- multinom(predclass ~ n_female + n_age + I(n_age^2) + n_race + n_born + n_nsb + n_fedu + n_chfinance + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod2 <- multinom(predclass ~ n_female*n_age + n_female*I(n_age^2) + n_race + n_born + n_nsb + n_fedu + n_chfinance + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod3 <- multinom(predclass ~ n_female*n_race + n_age + I(n_age^2) + n_born + n_nsb + n_fedu + n_chfinance + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod4 <- multinom(predclass ~ n_female*n_born + n_age + I(n_age^2) + n_race + n_nsb + n_fedu + n_chfinance + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod5 <- multinom(predclass ~ n_female*n_nsb + n_age + I(n_age^2) + n_race + n_born + n_fedu + n_chfinance + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod6 <- multinom(predclass ~ n_female*n_fedu + n_age + I(n_age^2) + n_race + n_born + n_nsb + n_chfinance + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod7 <- multinom(predclass ~ n_female*n_chfinance + n_age + I(n_age^2) + n_race + n_born + n_nsb + n_fedu + n_chhealth + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod8 <- multinom(predclass ~ n_female*n_chhealth + n_age + I(n_age^2) + n_race + n_born + n_nsb + n_fedu + n_chfinance + n_chrlshpprt,
data = childless_df,
weights = Weights),
mod9 <- multinom(predclass ~ n_female*n_chrlshpprt + n_age + I(n_age^2) + n_race + n_born + n_nsb + n_fedu + n_chfinance + n_chhealth,
data = childless_df,
weights = Weights))