To be able to analyze the outcome variable of education with its relationship between Hispanics and Non Hispanics we will conduct a Non Proportional Odds Logistic Regression. By doing this we will create two key groups of models. The proportional odds models and those of non proportional odds.
These models will be observed and compared amongst each other when at the AIC phase to see which has model has the best for the data. This method is key to observe all nuances of educational attainment between Hispanics and Non Hispanics. By doing this the educational attainment variable will be coded to be observed in a ordered logistic regression.
The variable will be coded with those with less than high school as the reference, those with high school education, those with at least four years of college education, and those with more than four years of college education insinuating that of a advanced degree. By conducting this analytical model each respective educational group can be observed with the next to see what interactions can be had. This is to be better than a nominal logistic regression because of the ordering of the variable so it has relations as opposed to no true relations a nominal variable presents.
A number of four models will be conducted for each group of the proportional and non proportional odds models. This will be conducted as two nested models for each of those groups with four models in each nest.
The key predictor variables will be Hispanics/NonHispanics as the key predictor variable. Model two introduces the variable for sex. Model three is when the variable used to measure discrimination are added to the model. These variables are if the respondent was not perceived smart and if the respondent had ever been discriminated. In model four I introduced the variables that help measure parental capital that may influence their educational outcomes. The variables to measure this will be if the respondent had secure economic resources at the age of 16 and if the respondent was born in the US. The control variable for all of these models will be age; which is broken down into intervals to control for age heaping as well as to observe across age groups.
When observing the eight different models between those proportional and non proportional odds assumptions the AIC with the lowest value is the model with all of the variables introduced into the model in the group for that of non proportional odds assumptions.
When reviewing the overall findings a key observation is that when looking across all of the AIC measures the non proportional odds assumption was the better model in comparison with its proportional odds counterpart.
Since the non proportional odds models are a the better models across the board the nested model for the non proportional odds will be observed. From that nested model we can see that across all four regression models as well as amongst all educational groups it is found to be statistically significant that Non-Hispanics have higher educational attainment than Hispanics. This is no matter the group of variables introduced into the model. This being so shows that those variables of discrimination and parental factors could not negate the statistical significance between Hispanics and Non Hispanics.
Of the variables introduced for sex it was statistically signifant with men having more advanced degree’s than women. This significance is lost when accounting for discrimination variables and parental factors.
For the group of discrimination variables a statistical relationship was found with those who have been disrespected having higher educational attainment than those who have not for those with four year degrees and no where else.
When the parental factor variables were introduced it was statistically significant at each educational group showing that those with economic resources at 16 had better educational outcomes than those who did not. When observing if the respondent was born in the US it was statistically significant for only one educational group showing that those who were born outside of the US tend to have greater educational attainment than those born in the US when observing the educational group of advanced degrees past those four years of college.
With these various models it shows that even when controlling for parental factors as well as discrimination the statistical relationship remains between Hispanics and Non Hispanics showing that Non Hispanics tend to have higher educational attainment than Hispanics.
library(haven)
library(janitor)
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
library(scales)
library(sur)
library(plyr)
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
##
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
##
## arrange, count, desc, failwith, id, mutate, rename, summarise,
## summarize
library(summarytools)
library(Rmisc)
## Loading required package: lattice
library(car)
## Loading required package: carData
##
## Attaching package: 'carData'
## The following objects are masked from 'package:sur':
##
## Anscombe, States
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
library(forcats)
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v tibble 3.1.6 v purrr 0.3.4
## v tidyr 1.1.4 v stringr 1.4.0
## v readr 2.1.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x plyr::arrange() masks dplyr::arrange()
## x readr::col_factor() masks scales::col_factor()
## x purrr::compact() masks plyr::compact()
## x plyr::count() masks dplyr::count()
## x purrr::discard() masks scales::discard()
## x plyr::failwith() masks dplyr::failwith()
## x dplyr::filter() masks stats::filter()
## x plyr::id() masks dplyr::id()
## x dplyr::lag() masks stats::lag()
## x plyr::mutate() masks dplyr::mutate()
## x car::recode() masks dplyr::recode()
## x plyr::rename() masks dplyr::rename()
## x purrr::some() masks car::some()
## x plyr::summarise() masks dplyr::summarise()
## x plyr::summarize() masks dplyr::summarize()
## x tibble::view() masks summarytools::view()
library(survey)
## Loading required package: grid
## Loading required package: Matrix
##
## Attaching package: 'Matrix'
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
## Loading required package: survival
##
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
##
## dotchart
library(stargazer)
##
## Please cite as:
## Hlavac, Marek (2018). stargazer: Well-Formatted Regression and Summary Statistics Tables.
## R package version 5.2.2. https://CRAN.R-project.org/package=stargazer
library(grid)
library(Matrix)
library(caret)
##
## Attaching package: 'caret'
## The following object is masked from 'package:survival':
##
## cluster
## The following object is masked from 'package:purrr':
##
## lift
gss2021_ZERODraft<-read_dta("C:\\Users\\BTP\\Desktop\\STATS 2 FOLDER\\2021_sas\\gss2021.dta")
gss2021_ZERODraft %>%
tabyl(hispanic)
## hispanic n percent valid_percent
## 1 3544 0.8789682540 0.8864432216
## 2 245 0.0607638889 0.0612806403
## 3 51 0.0126488095 0.0127563782
## 4 21 0.0052083333 0.0052526263
## 5 9 0.0022321429 0.0022511256
## 6 2 0.0004960317 0.0005002501
## 7 4 0.0009920635 0.0010005003
## 8 2 0.0004960317 0.0005002501
## 9 4 0.0009920635 0.0010005003
## 10 5 0.0012400794 0.0012506253
## 11 3 0.0007440476 0.0007503752
## 15 17 0.0042162698 0.0042521261
## 20 4 0.0009920635 0.0010005003
## 21 8 0.0019841270 0.0020010005
## 22 10 0.0024801587 0.0025012506
## 23 5 0.0012400794 0.0012506253
## 24 1 0.0002480159 0.0002501251
## 25 1 0.0002480159 0.0002501251
## 30 46 0.0114087302 0.0115057529
## 35 1 0.0002480159 0.0002501251
## 41 3 0.0007440476 0.0007503752
## 46 2 0.0004960317 0.0005002501
## 47 7 0.0017361111 0.0017508754
## 50 3 0.0007440476 0.0007503752
## NA 34 0.0084325397 NA
gss2021_ZERODraft$subgrouphis <-Recode(gss2021_ZERODraft$hispanic, recodes="1 = 0; 2:50 = 1; else=NA", as.factor=T)
gss2021_ZERODraft %>%
tabyl(subgrouphis)
## subgrouphis n percent valid_percent
## 0 3544 0.87896825 0.8864432
## 1 454 0.11259921 0.1135568
## <NA> 34 0.00843254 NA
subgrouphis_1<-as.factor(ifelse(gss2021_ZERODraft$subgrouphis==1, "Hispanic", "Non Hispanic"))
tabyl(subgrouphis_1)
## subgrouphis_1 n percent valid_percent
## Hispanic 454 0.11259921 0.1135568
## Non Hispanic 3544 0.87896825 0.8864432
## <NA> 34 0.00843254 NA
gss2021_ZERODraft %>%
tabyl(educ)
## educ n percent valid_percent
## 0 9 0.0022321429 0.0022692890
## 1 1 0.0002480159 0.0002521432
## 2 2 0.0004960317 0.0005042864
## 3 3 0.0007440476 0.0007564297
## 4 1 0.0002480159 0.0002521432
## 5 2 0.0004960317 0.0005042864
## 6 15 0.0037202381 0.0037821483
## 7 5 0.0012400794 0.0012607161
## 8 25 0.0062003968 0.0063035804
## 9 32 0.0079365079 0.0080685830
## 10 52 0.0128968254 0.0131114473
## 11 83 0.0205853175 0.0209278870
## 12 829 0.2056051587 0.2090267272
## 13 277 0.0687003968 0.0698436712
## 14 542 0.1344246032 0.1366616238
## 15 208 0.0515873016 0.0524457892
## 16 942 0.2336309524 0.2375189107
## 17 258 0.0639880952 0.0650529501
## 18 351 0.0870535714 0.0885022693
## 19 113 0.0280257937 0.0284921836
## 20 216 0.0535714286 0.0544629349
## NA 66 0.0163690476 NA
gss2021_ZERODraft$AllEducLevels <-Recode(gss2021_ZERODraft$educ, recodes="0:11 = 1; 12 = 2; 13:16 = 3; 17:20 = 4; else=NA", as.factor=T)
gss2021_ZERODraft$AllEducLevels<-relevel(gss2021_ZERODraft$AllEducLevels, ref = "1")
gss2021_ZERODraft %>%
tabyl(AllEducLevels)
## AllEducLevels n percent valid_percent
## 1 230 0.05704365 0.05799294
## 2 829 0.20560516 0.20902673
## 3 1969 0.48834325 0.49646999
## 4 938 0.23263889 0.23651034
## <NA> 66 0.01636905 NA
gss2021_ZERODraft %>%
tabyl(sex)
## sex n percent valid_percent
## 1 1736 0.43055556 0.4406091
## 2 2204 0.54662698 0.5593909
## NA 92 0.02281746 NA
gss2021_ZERODraft$subgroupsex <-Recode(gss2021_ZERODraft$sex, recodes="1:1 = 0; 2:2 = 1; else=NA", as.factor=T)
gss2021_ZERODraft %>%
tabyl(subgroupsex)
## subgroupsex n percent valid_percent
## 0 1736 0.43055556 0.4406091
## 1 2204 0.54662698 0.5593909
## <NA> 92 0.02281746 NA
subgroupsex_1<-as.factor(ifelse(gss2021_ZERODraft$subgroupsex==1, "Women", "Men"))
tabyl(subgroupsex_1)
## subgroupsex_1 n percent valid_percent
## Men 1736 0.43055556 0.4406091
## Women 2204 0.54662698 0.5593909
## <NA> 92 0.02281746 NA
gss2021_ZERODraft %>%
tabyl(incom16)
## incom16 n percent valid_percent
## 1 421 0.10441468 0.11003659
## 2 1013 0.25124008 0.26476738
## 3 1625 0.40302579 0.42472556
## 4 679 0.16840278 0.17746994
## 5 88 0.02182540 0.02300052
## NA 206 0.05109127 NA
gss2021_ZERODraft$subgroupincom16 <-Recode(gss2021_ZERODraft$incom16, recodes="1:2 = 0; 3:5 = 1; else=NA", as.factor=T)
gss2021_ZERODraft %>%
tabyl(subgroupincom16)
## subgroupincom16 n percent valid_percent
## 0 1434 0.35565476 0.374804
## 1 2392 0.59325397 0.625196
## <NA> 206 0.05109127 NA
subgroupincom16_1<-as.factor(ifelse(gss2021_ZERODraft$subgroupincom16==1, "secure economic resources at 16", "insecure economic resources"))
tabyl(subgroupincom16_1)
## subgroupincom16_1 n percent valid_percent
## insecure economic resources 1434 0.35565476 0.374804
## secure economic resources at 16 2392 0.59325397 0.625196
## <NA> 206 0.05109127 NA
gss2021_ZERODraft %>%
tabyl(born)
## born n percent valid_percent
## 1 3516 0.87202381 0.8878788
## 2 444 0.11011905 0.1121212
## NA 72 0.01785714 NA
gss2021_ZERODraft$subgroupBorn <-Recode(gss2021_ZERODraft$born, recodes="1:1 = 1; 2:2 = 0; else=NA", as.factor=T)
gss2021_ZERODraft %>%
tabyl(subgroupBorn)
## subgroupBorn n percent valid_percent
## 0 444 0.11011905 0.1121212
## 1 3516 0.87202381 0.8878788
## <NA> 72 0.01785714 NA
subgroupborn_1<-as.factor(ifelse(gss2021_ZERODraft$subgroupBorn==1, "Born in US", "Not born in US"))
tabyl(subgroupborn_1)
## subgroupborn_1 n percent valid_percent
## Born in US 3516 0.87202381 0.8878788
## Not born in US 444 0.11011905 0.1121212
## <NA> 72 0.01785714 NA
gss2021_ZERODraft %>%
tabyl(disrspct)
## disrspct n percent valid_percent
## 1 136 0.03373016 0.05228758
## 2 231 0.05729167 0.08881200
## 3 327 0.08110119 0.12572088
## 4 801 0.19866071 0.30795848
## 5 552 0.13690476 0.21222607
## 6 554 0.13740079 0.21299500
## NA 1431 0.35491071 NA
gss2021_ZERODraft$subgroupdisrspct <-Recode(gss2021_ZERODraft$disrspct, recodes="1:5 = 1; 6:6 = 0; else=NA", as.factor=T)
gss2021_ZERODraft %>%
tabyl(subgroupdisrspct)
## subgroupdisrspct n percent valid_percent
## 0 554 0.1374008 0.212995
## 1 2047 0.5076885 0.787005
## <NA> 1431 0.3549107 NA
subgroupdisrspct_1<-as.factor(ifelse(gss2021_ZERODraft$subgroupdisrspct==1, "respondent has been disrespected", "Not being disrespected"))
tabyl(subgroupdisrspct_1)
## subgroupdisrspct_1 n percent valid_percent
## Not being disrespected 554 0.1374008 0.212995
## respondent has been disrespected 2047 0.5076885 0.787005
## <NA> 1431 0.3549107 NA
gss2021_ZERODraft %>%
tabyl(notsmart)
## notsmart n percent valid_percent
## 1 101 0.02504960 0.03881630
## 2 129 0.03199405 0.04957725
## 3 202 0.05009921 0.07763259
## 4 684 0.16964286 0.26287471
## 5 619 0.15352183 0.23789393
## 6 867 0.21502976 0.33320523
## NA 1430 0.35466270 NA
gss2021_ZERODraft$subgroupnotsmart <-Recode(gss2021_ZERODraft$notsmart, recodes="1:5 = 1; 6:6 = 0; else=NA", as.factor=T)
gss2021_ZERODraft %>%
tabyl(subgroupnotsmart)
## subgroupnotsmart n percent valid_percent
## 0 867 0.2150298 0.3332052
## 1 1735 0.4303075 0.6667948
## <NA> 1430 0.3546627 NA
subgroupnotsmart_1<-as.factor(ifelse(gss2021_ZERODraft$subgroupnotsmart==1, "respondent was told or treated as if they are not smart", "Never experienced that sort of treatment of not being smart"))
tabyl(subgroupnotsmart_1)
## subgroupnotsmart_1 n percent
## Never experienced that sort of treatment of not being smart 867 0.2150298
## respondent was told or treated as if they are not smart 1735 0.4303075
## <NA> 1430 0.3546627
## valid_percent
## 0.3332052
## 0.6667948
## NA
age1<-cut(gss2021_ZERODraft$age,
breaks = c(0,24,39,59,79,99))
sub <- gss2021_ZERODraft %>%
select(AllEducLevels,subgrouphis,subgroupBorn,subgroupsex,subgroupincom16,subgroupdisrspct,subgroupnotsmart,age,vstrat,wtssnrps) %>%
filter(complete.cases(.))
library(srvyr)
##
## Attaching package: 'srvyr'
## The following objects are masked from 'package:plyr':
##
## mutate, rename, summarise, summarize
## The following object is masked from 'package:stats':
##
## filter
options(survey.lonely.psu = "adjust")
des<-svydesign(ids=~1, strata=~vstrat, weights=~wtssnrps, data=gss2021_ZERODraft)
library(VGAM)
## Loading required package: stats4
## Loading required package: splines
##
## Attaching package: 'VGAM'
## The following object is masked from 'package:caret':
##
## predictors
## The following object is masked from 'package:survey':
##
## calibrate
## The following object is masked from 'package:tidyr':
##
## fill
## The following object is masked from 'package:car':
##
## logit
library(svyVGAM)
library(gtsummary)
##
## Attaching package: 'gtsummary'
## The following object is masked from 'package:plyr':
##
## mutate
#Proportional odds
fit.hisonly<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+age1,
design = des,
family=cumulative(parallel = T,
reverse = T))
#hispanic only
fit.hissex<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+subgroupsex_1+age1,
design = des,
family=cumulative(parallel = T,
reverse = T))
#hispanic and sex
fit.perdiscrim<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+subgroupsex_1+subgroupnotsmart_1+subgroupdisrspct_1+age1,
design = des,
family=cumulative(parallel = T,
reverse = T))
#perceived discrimination added
fit.allv<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+subgroupsex_1+subgroupincom16_1+subgroupborn_1+subgroupnotsmart_1+subgroupdisrspct_1+age1,
design = des,
family=cumulative(parallel = T,
reverse = T))
#Parental factors added (all variables)
hism1 <- fit.hisonly %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
hsexsm1 <- fit.hissex %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
hdism1 <- fit.perdiscrim %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
hallm1 <- fit.allv %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
m1_all<-tbl_merge(tbls = list(hism1,hsexsm1,hdism1,hallm1),
tab_spanner = c("**Hispanic only 1**","hispanic and sex 1","hispanic discrimination 1","Parental Factors (all variables"))
m1_all
| Characteristic | Hispanic only 1 | hispanic and sex 1 | hispanic discrimination 1 | Parental Factors (all variables | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Beta | 95% CI1 | p-value | Beta | 95% CI1 | p-value | Beta | 95% CI1 | p-value | Beta | 95% CI1 | p-value | |
| (Intercept):1 | 1.1 | 0.92, 1.4 | <0.001 | 1.2 | 1.0, 1.5 | <0.001 | 1.1 | 0.83, 1.5 | <0.001 | 0.88 | 0.54, 1.2 | <0.001 |
| (Intercept):2 | -0.50 | -0.70, -0.31 | <0.001 | -0.41 | -0.61, -0.21 | <0.001 | -0.49 | -0.75, -0.22 | <0.001 | -0.76 | -1.1, -0.47 | <0.001 |
| (Intercept):3 | -2.8 | -3.0, -2.6 | <0.001 | -2.7 | -2.9, -2.5 | <0.001 | -2.8 | -3.1, -2.6 | <0.001 | -3.2 | -3.5, -2.9 | <0.001 |
| subgrouphis_1Non Hispanic | 0.66 | 0.53, 0.79 | <0.001 | 0.67 | 0.54, 0.80 | <0.001 | 0.71 | 0.54, 0.87 | <0.001 | 0.75 | 0.56, 0.93 | <0.001 |
| age1(24,39] | 0.78 | 0.60, 1.0 | <0.001 | 0.76 | 0.58, 0.94 | <0.001 | 0.78 | 0.55, 1.0 | <0.001 | 0.77 | 0.53, 1.0 | <0.001 |
| age1(39,59] | 0.58 | 0.41, 0.76 | <0.001 | 0.58 | 0.40, 0.75 | <0.001 | 0.55 | 0.33, 0.77 | <0.001 | 0.56 | 0.33, 0.79 | <0.001 |
| age1(59,79] | 0.58 | 0.41, 0.76 | <0.001 | 0.56 | 0.38, 0.74 | <0.001 | 0.48 | 0.26, 0.70 | <0.001 | 0.47 | 0.24, 0.70 | <0.001 |
| age1(79,99] | 0.34 | 0.11, 0.57 | 0.004 | 0.32 | 0.08, 0.55 | 0.008 | 0.30 | 0.00, 0.60 | 0.051 | 0.34 | 0.03, 0.66 | 0.031 |
| subgroupsex_1Women | -0.17 | -0.25, -0.09 | <0.001 | -0.13 | -0.22, -0.03 | 0.011 | -0.11 | -0.21, -0.01 | 0.039 | |||
| subgroupnotsmart_1respondent was told or treated as if they are not smart | -0.07 | -0.19, 0.06 | 0.3 | -0.04 | -0.17, 0.09 | 0.5 | ||||||
| subgroupdisrspct_1respondent has been disrespected | 0.22 | 0.08, 0.36 | 0.002 | 0.18 | 0.04, 0.32 | 0.012 | ||||||
| subgroupincom16_1secure economic resources at 16 | 0.38 | 0.27, 0.48 | <0.001 | |||||||||
| subgroupborn_1Not born in US | 0.30 | 0.12, 0.48 | 0.001 | |||||||||
|
1
CI = Confidence Interval
|
||||||||||||
summary(fit.hisonly)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## age1, design = des, family = cumulative(parallel = T, reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef SE z p
## (Intercept):1 1.145892 0.115333 9.9355 < 2.2e-16
## (Intercept):2 -0.503321 0.098226 -5.1241 2.989e-07
## (Intercept):3 -2.802029 0.098788 -28.3640 < 2.2e-16
## subgrouphis_1Non Hispanic 0.658839 0.065130 10.1157 < 2.2e-16
## age1(24,39] 0.778916 0.090886 8.5703 < 2.2e-16
## age1(39,59] 0.582394 0.088513 6.5797 4.712e-11
## age1(59,79] 0.581644 0.089094 6.5284 6.646e-11
## age1(79,99] 0.338900 0.118567 2.8583 0.004259
summary(fit.hissex)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## subgroupsex_1 + age1, design = des, family = cumulative(parallel = T,
## reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef SE z p
## (Intercept):1 1.245960 0.119835 10.3973 < 2.2e-16
## (Intercept):2 -0.410126 0.103216 -3.9735 7.083e-05
## (Intercept):3 -2.712628 0.103305 -26.2584 < 2.2e-16
## subgrouphis_1Non Hispanic 0.671059 0.065700 10.2140 < 2.2e-16
## subgroupsex_1Women -0.171640 0.039873 -4.3047 1.672e-05
## age1(24,39] 0.762081 0.092166 8.2685 < 2.2e-16
## age1(39,59] 0.575819 0.089578 6.4281 1.292e-10
## age1(59,79] 0.560806 0.090242 6.2144 5.151e-10
## age1(79,99] 0.316048 0.119321 2.6487 0.00808
summary(fit.perdiscrim)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## subgroupsex_1 + subgroupnotsmart_1 + subgroupdisrspct_1 +
## age1, design = des, family = cumulative(parallel = T, reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef
## (Intercept):1 1.142474
## (Intercept):2 -0.487563
## (Intercept):3 -2.848900
## subgrouphis_1Non Hispanic 0.708267
## subgroupsex_1Women -0.126427
## subgroupnotsmart_1respondent was told or treated as if they are not smart -0.065270
## subgroupdisrspct_1respondent has been disrespected 0.220441
## age1(24,39] 0.778777
## age1(39,59] 0.552284
## age1(59,79] 0.475433
## age1(79,99] 0.297774
## SE
## (Intercept):1 0.159462
## (Intercept):2 0.135111
## (Intercept):3 0.137775
## subgrouphis_1Non Hispanic 0.084272
## subgroupsex_1Women 0.049775
## subgroupnotsmart_1respondent was told or treated as if they are not smart 0.062118
## subgroupdisrspct_1respondent has been disrespected 0.070876
## age1(24,39] 0.115186
## age1(39,59] 0.111223
## age1(59,79] 0.112102
## age1(79,99] 0.152559
## z
## (Intercept):1 7.1646
## (Intercept):2 -3.6086
## (Intercept):3 -20.6780
## subgrouphis_1Non Hispanic 8.4045
## subgroupsex_1Women -2.5400
## subgroupnotsmart_1respondent was told or treated as if they are not smart -1.0507
## subgroupdisrspct_1respondent has been disrespected 3.1103
## age1(24,39] 6.7611
## age1(39,59] 4.9656
## age1(59,79] 4.2411
## age1(79,99] 1.9519
## p
## (Intercept):1 7.804e-13
## (Intercept):2 0.0003078
## (Intercept):3 < 2.2e-16
## subgrouphis_1Non Hispanic < 2.2e-16
## subgroupsex_1Women 0.0110861
## subgroupnotsmart_1respondent was told or treated as if they are not smart 0.2933786
## subgroupdisrspct_1respondent has been disrespected 0.0018692
## age1(24,39] 1.370e-11
## age1(39,59] 6.850e-07
## age1(59,79] 2.225e-05
## age1(79,99] 0.0509542
summary(fit.allv)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## subgroupsex_1 + subgroupincom16_1 + subgroupborn_1 + subgroupnotsmart_1 +
## subgroupdisrspct_1 + age1, design = des, family = cumulative(parallel = T,
## reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef
## (Intercept):1 0.883761
## (Intercept):2 -0.764026
## (Intercept):3 -3.157445
## subgrouphis_1Non Hispanic 0.746612
## subgroupsex_1Women -0.105714
## subgroupincom16_1secure economic resources at 16 0.377572
## subgroupborn_1Not born in US 0.299640
## subgroupnotsmart_1respondent was told or treated as if they are not smart -0.038905
## subgroupdisrspct_1respondent has been disrespected 0.182104
## age1(24,39] 0.772137
## age1(39,59] 0.558905
## age1(59,79] 0.471147
## age1(79,99] 0.344759
## SE
## (Intercept):1 0.174842
## (Intercept):2 0.148850
## (Intercept):3 0.155245
## subgrouphis_1Non Hispanic 0.093246
## subgroupsex_1Women 0.051335
## subgroupincom16_1secure economic resources at 16 0.053272
## subgroupborn_1Not born in US 0.091903
## subgroupnotsmart_1respondent was told or treated as if they are not smart 0.064705
## subgroupdisrspct_1respondent has been disrespected 0.072429
## age1(24,39] 0.121630
## age1(39,59] 0.115944
## age1(59,79] 0.116805
## age1(79,99] 0.160067
## z
## (Intercept):1 5.0546
## (Intercept):2 -5.1329
## (Intercept):3 -20.3385
## subgrouphis_1Non Hispanic 8.0069
## subgroupsex_1Women -2.0593
## subgroupincom16_1secure economic resources at 16 7.0876
## subgroupborn_1Not born in US 3.2604
## subgroupnotsmart_1respondent was told or treated as if they are not smart -0.6013
## subgroupdisrspct_1respondent has been disrespected 2.5142
## age1(24,39] 6.3483
## age1(39,59] 4.8205
## age1(59,79] 4.0336
## age1(79,99] 2.1538
## p
## (Intercept):1 4.312e-07
## (Intercept):2 2.854e-07
## (Intercept):3 < 2.2e-16
## subgrouphis_1Non Hispanic 1.176e-15
## subgroupsex_1Women 0.039467
## subgroupincom16_1secure economic resources at 16 1.364e-12
## subgroupborn_1Not born in US 0.001113
## subgroupnotsmart_1respondent was told or treated as if they are not smart 0.547660
## subgroupdisrspct_1respondent has been disrespected 0.011929
## age1(24,39] 2.178e-10
## age1(39,59] 1.432e-06
## age1(59,79] 5.492e-05
## age1(79,99] 0.031253
#Non-proportional odds
fit.hisonly2<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+age1,
design = des,
family=cumulative(parallel = F, reverse = T))
#hispanic only
fit.hissex2<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+subgroupsex_1+age1,
design = des,
family=cumulative(parallel = F, reverse = T))
#hispanic and sex
fit.perdiscrim2<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+subgroupsex_1+subgroupnotsmart_1+subgroupdisrspct_1+age1,
design = des,
family=cumulative(parallel = F, reverse = T))
#perceived discrimination added
fit.allv2<-svy_vglm(as.ordered(AllEducLevels)~subgrouphis_1+subgroupsex_1+subgroupincom16_1+subgroupborn_1+subgroupnotsmart_1+subgroupdisrspct_1+age1,
design = des,
family=cumulative(parallel = F, reverse = T))
hism2 <- fit.hisonly2 %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
hsexsm2 <- fit.hissex2 %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
hdism2 <- fit.perdiscrim2 %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
hallm2 <- fit.allv2 %>%
tbl_regression()
## ! `broom::tidy()` failed to tidy the model.
## x No tidy method for objects of class svy_vglm
## v `tidy_parameters()` used instead.
## i Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
## x Unable to identify the list of variables.
##
## This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
## It could be the case if that type of model does not implement these methods.
## Rarely, this error may occur if the model object was created within
## a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
m2_all<-tbl_merge(tbls = list(hism2,hsexsm2,hdism2,hallm2),
tab_spanner = c("**Hispanic only 2**","hispanic and sex 2","hispanic discrimination 2","Parental Factors 2 (all variables"))
m2_all
| Characteristic | Hispanic only 2 | hispanic and sex 2 | hispanic discrimination 2 | Parental Factors 2 (all variables | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Beta | 95% CI1 | p-value | Beta | 95% CI1 | p-value | Beta | 95% CI1 | p-value | Beta | 95% CI1 | p-value | |
| (Intercept):1 | 1.2 | 0.58, 1.7 | <0.001 | 1.3 | 0.64, 1.9 | <0.001 | 1.2 | 0.40, 2.0 | 0.003 | 0.93 | 0.09, 1.8 | 0.030 |
| (Intercept):2 | -0.37 | -0.72, -0.01 | 0.047 | -0.32 | -0.69, 0.05 | 0.093 | -0.37 | -0.85, 0.10 | 0.12 | -0.58 | -1.1, -0.04 | 0.036 |
| (Intercept):3 | -3.8 | -4.6, -3.1 | <0.001 | -3.7 | -4.3, -3.0 | <0.001 | -4.1 | -5.1, -3.1 | <0.001 | -4.5 | -5.6, -3.5 | <0.001 |
| subgrouphis_1Non Hispanic:1 | 0.84 | 0.45, 1.2 | <0.001 | 0.86 | 0.48, 1.2 | <0.001 | 0.80 | 0.30, 1.3 | 0.002 | 0.94 | 0.42, 1.4 | <0.001 |
| subgrouphis_1Non Hispanic:2 | 0.64 | 0.41, 0.86 | <0.001 | 0.65 | 0.42, 0.88 | <0.001 | 0.77 | 0.48, 1.1 | <0.001 | 0.77 | 0.44, 1.1 | <0.001 |
| subgrouphis_1Non Hispanic:3 | 0.61 | 0.28, 0.95 | <0.001 | 0.60 | 0.27, 0.94 | <0.001 | 0.49 | 0.06, 0.91 | 0.024 | 0.49 | 0.04, 0.93 | 0.034 |
| age1(24,39]:1 | 0.43 | -0.17, 1.0 | 0.2 | 0.40 | -0.20, 1.0 | 0.2 | 0.59 | -0.11, 1.3 | 0.10 | 0.62 | -0.12, 1.4 | 0.10 |
| age1(24,39]:2 | 0.72 | 0.36, 1.1 | <0.001 | 0.70 | 0.34, 1.1 | <0.001 | 0.53 | 0.09, 1.0 | 0.018 | 0.47 | 0.01, 0.94 | 0.046 |
| age1(24,39]:3 | 1.8 | 1.2, 2.5 | <0.001 | 1.8 | 1.2, 2.4 | <0.001 | 2.4 | 1.5, 3.3 | <0.001 | 2.5 | 1.5, 3.4 | <0.001 |
| age1(39,59]:1 | 0.40 | -0.19, 1.0 | 0.2 | 0.39 | -0.21, 1.0 | 0.2 | 0.62 | -0.07, 1.3 | 0.077 | 0.64 | -0.07, 1.4 | 0.079 |
| age1(39,59]:2 | 0.46 | 0.12, 0.81 | 0.009 | 0.45 | 0.11, 0.80 | 0.011 | 0.32 | -0.11, 0.75 | 0.15 | 0.29 | -0.16, 0.75 | 0.2 |
| age1(39,59]:3 | 1.7 | 1.0, 2.3 | <0.001 | 1.7 | 1.0, 2.3 | <0.001 | 2.1 | 1.2, 3.0 | <0.001 | 2.1 | 1.2, 3.1 | <0.001 |
| age1(59,79]:1 | 0.64 | 0.01, 1.3 | 0.046 | 0.61 | -0.02, 1.2 | 0.059 | 0.58 | -0.13, 1.3 | 0.11 | 0.54 | -0.19, 1.3 | 0.14 |
| age1(59,79]:2 | 0.37 | 0.03, 0.72 | 0.034 | 0.35 | 0.00, 0.70 | 0.047 | 0.12 | -0.31, 0.55 | 0.6 | 0.07 | -0.38, 0.52 | 0.8 |
| age1(59,79]:3 | 1.8 | 1.1, 2.4 | <0.001 | 1.7 | 1.1, 2.4 | <0.001 | 2.2 | 1.3, 3.1 | <0.001 | 2.3 | 1.3, 3.2 | <0.001 |
| age1(79,99]:1 | 0.24 | -0.56, 1.0 | 0.6 | 0.22 | -0.60, 1.0 | 0.6 | 0.16 | -0.79, 1.1 | 0.7 | 0.09 | -0.88, 1.1 | 0.9 |
| age1(79,99]:2 | 0.04 | -0.41, 0.48 | 0.9 | 0.02 | -0.43, 0.46 | >0.9 | -0.13 | -0.69, 0.42 | 0.6 | -0.12 | -0.69, 0.46 | 0.7 |
| age1(79,99]:3 | 1.8 | 1.1, 2.5 | <0.001 | 1.7 | 1.0, 2.4 | <0.001 | 2.3 | 1.3, 3.3 | <0.001 | 2.4 | 1.4, 3.4 | <0.001 |
| subgroupsex_1Women:1 | -0.19 | -0.50, 0.11 | 0.2 | -0.04 | -0.41, 0.33 | 0.8 | 0.09 | -0.28, 0.47 | 0.6 | |||
| subgroupsex_1Women:2 | -0.08 | -0.23, 0.07 | 0.3 | -0.09 | -0.28, 0.10 | 0.3 | -0.08 | -0.28, 0.11 | 0.4 | |||
| subgroupsex_1Women:3 | -0.31 | -0.47, -0.14 | <0.001 | -0.20 | -0.40, 0.01 | 0.056 | -0.20 | -0.41, 0.01 | 0.061 | |||
| subgroupnotsmart_1respondent was told or treated as if they are not smart:1 | -0.25 | -0.76, 0.26 | 0.3 | -0.27 | -0.82, 0.28 | 0.3 | ||||||
| subgroupnotsmart_1respondent was told or treated as if they are not smart:2 | -0.05 | -0.27, 0.18 | 0.7 | -0.02 | -0.25, 0.22 | 0.9 | ||||||
| subgroupnotsmart_1respondent was told or treated as if they are not smart:3 | -0.03 | -0.28, 0.22 | 0.8 | 0.01 | -0.24, 0.26 | >0.9 | ||||||
| subgroupdisrspct_1respondent has been disrespected:1 | 0.19 | -0.37, 0.75 | 0.5 | 0.03 | -0.58, 0.63 | >0.9 | ||||||
| subgroupdisrspct_1respondent has been disrespected:2 | 0.29 | 0.04, 0.54 | 0.024 | 0.24 | -0.02, 0.50 | 0.066 | ||||||
| subgroupdisrspct_1respondent has been disrespected:3 | 0.10 | -0.19, 0.39 | 0.5 | 0.12 | -0.17, 0.41 | 0.4 | ||||||
| subgroupincom16_1secure economic resources at 16:1 | 0.40 | 0.01, 0.79 | 0.045 | |||||||||
| subgroupincom16_1secure economic resources at 16:2 | 0.41 | 0.21, 0.61 | <0.001 | |||||||||
| subgroupincom16_1secure economic resources at 16:3 | 0.34 | 0.12, 0.57 | 0.003 | |||||||||
| subgroupborn_1Not born in US:1 | 0.23 | -0.41, 0.87 | 0.5 | |||||||||
| subgroupborn_1Not born in US:2 | 0.22 | -0.15, 0.60 | 0.2 | |||||||||
| subgroupborn_1Not born in US:3 | 0.43 | 0.08, 0.77 | 0.016 | |||||||||
|
1
CI = Confidence Interval
|
||||||||||||
summary(fit.hisonly2)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## age1, design = des, family = cumulative(parallel = F, reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef SE z p
## (Intercept):1 1.150250 0.289995 3.9665 7.295e-05
## (Intercept):2 -0.365045 0.183488 -1.9895 0.046649
## (Intercept):3 -3.841316 0.361626 -10.6223 < 2.2e-16
## subgrouphis_1Non Hispanic:1 0.836775 0.196721 4.2536 2.103e-05
## subgrouphis_1Non Hispanic:2 0.635862 0.116458 5.4600 4.762e-08
## subgrouphis_1Non Hispanic:3 0.613449 0.169601 3.6170 0.000298
## age1(24,39]:1 0.428978 0.305706 1.4032 0.160547
## age1(24,39]:2 0.722733 0.182960 3.9502 7.808e-05
## age1(24,39]:3 1.825594 0.336286 5.4287 5.677e-08
## age1(39,59]:1 0.400997 0.302818 1.3242 0.185431
## age1(39,59]:2 0.460372 0.176041 2.6151 0.008919
## age1(39,59]:3 1.684276 0.331850 5.0754 3.867e-07
## age1(59,79]:1 0.639161 0.320099 1.9968 0.045851
## age1(59,79]:2 0.374567 0.177063 2.1154 0.034392
## age1(59,79]:3 1.765447 0.331394 5.3273 9.966e-08
## age1(79,99]:1 0.239159 0.408651 0.5852 0.558387
## age1(79,99]:2 0.037902 0.226414 0.1674 0.867053
## age1(79,99]:3 1.798741 0.370174 4.8592 1.179e-06
summary(fit.hissex2)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## subgroupsex_1 + age1, design = des, family = cumulative(parallel = F,
## reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef SE z p
## (Intercept):1 1.259808 0.317830 3.9638 7.377e-05
## (Intercept):2 -0.318982 0.190035 -1.6785 0.0932406
## (Intercept):3 -3.656207 0.353849 -10.3327 < 2.2e-16
## subgrouphis_1Non Hispanic:1 0.861512 0.196347 4.3877 1.146e-05
## subgrouphis_1Non Hispanic:2 0.650068 0.116690 5.5709 2.535e-08
## subgrouphis_1Non Hispanic:3 0.603108 0.170021 3.5473 0.0003893
## subgroupsex_1Women:1 -0.192647 0.154385 -1.2478 0.2120906
## subgroupsex_1Women:2 -0.083350 0.077265 -1.0788 0.2806975
## subgroupsex_1Women:3 -0.306415 0.084861 -3.6108 0.0003052
## age1(24,39]:1 0.403370 0.308585 1.3072 0.1911587
## age1(24,39]:2 0.703612 0.183940 3.8252 0.0001306
## age1(24,39]:3 1.799014 0.328862 5.4704 4.490e-08
## age1(39,59]:1 0.385669 0.303939 1.2689 0.2044761
## age1(39,59]:2 0.452515 0.177019 2.5563 0.0105790
## age1(39,59]:3 1.666397 0.324527 5.1349 2.824e-07
## age1(59,79]:1 0.609853 0.322592 1.8905 0.0586942
## age1(59,79]:2 0.354190 0.178279 1.9867 0.0469542
## age1(59,79]:3 1.725906 0.323764 5.3308 9.780e-08
## age1(79,99]:1 0.221443 0.416787 0.5313 0.5952041
## age1(79,99]:2 0.017247 0.228046 0.0756 0.9397149
## age1(79,99]:3 1.730818 0.365377 4.7371 2.168e-06
summary(fit.perdiscrim2)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## subgroupsex_1 + subgroupnotsmart_1 + subgroupdisrspct_1 +
## age1, design = des, family = cumulative(parallel = F, reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef
## (Intercept):1 1.195573
## (Intercept):2 -0.373298
## (Intercept):3 -4.101578
## subgrouphis_1Non Hispanic:1 0.796487
## subgrouphis_1Non Hispanic:2 0.771177
## subgrouphis_1Non Hispanic:3 0.487361
## subgroupsex_1Women:1 -0.038675
## subgroupsex_1Women:2 -0.092463
## subgroupsex_1Women:3 -0.199183
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 -0.253932
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 -0.046443
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 -0.029089
## subgroupdisrspct_1respondent has been disrespected:1 0.187243
## subgroupdisrspct_1respondent has been disrespected:2 0.288342
## subgroupdisrspct_1respondent has been disrespected:3 0.099998
## age1(24,39]:1 0.587368
## age1(24,39]:2 0.532859
## age1(24,39]:3 2.375514
## age1(39,59]:1 0.620773
## age1(39,59]:2 0.318204
## age1(39,59]:3 2.064517
## age1(59,79]:1 0.575729
## age1(59,79]:2 0.122391
## age1(59,79]:3 2.181155
## age1(79,99]:1 0.156067
## age1(79,99]:2 -0.131451
## age1(79,99]:3 2.275973
## SE
## (Intercept):1 0.406131
## (Intercept):2 0.241643
## (Intercept):3 0.488141
## subgrouphis_1Non Hispanic:1 0.253106
## subgrouphis_1Non Hispanic:2 0.147874
## subgrouphis_1Non Hispanic:3 0.215539
## subgroupsex_1Women:1 0.188004
## subgroupsex_1Women:2 0.096648
## subgroupsex_1Women:3 0.104350
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 0.260034
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 0.116021
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 0.128055
## subgroupdisrspct_1respondent has been disrespected:1 0.285920
## subgroupdisrspct_1respondent has been disrespected:2 0.127510
## subgroupdisrspct_1respondent has been disrespected:3 0.146492
## age1(24,39]:1 0.356524
## age1(24,39]:2 0.225018
## age1(24,39]:3 0.455205
## age1(39,59]:1 0.350560
## age1(39,59]:2 0.218847
## age1(39,59]:3 0.454486
## age1(59,79]:1 0.357635
## age1(59,79]:2 0.220191
## age1(59,79]:3 0.456117
## age1(79,99]:1 0.480451
## age1(79,99]:2 0.282715
## age1(79,99]:3 0.499095
## z
## (Intercept):1 2.9438
## (Intercept):2 -1.5448
## (Intercept):3 -8.4025
## subgrouphis_1Non Hispanic:1 3.1468
## subgrouphis_1Non Hispanic:2 5.2151
## subgrouphis_1Non Hispanic:3 2.2611
## subgroupsex_1Women:1 -0.2057
## subgroupsex_1Women:2 -0.9567
## subgroupsex_1Women:3 -1.9088
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 -0.9765
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 -0.4003
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 -0.2272
## subgroupdisrspct_1respondent has been disrespected:1 0.6549
## subgroupdisrspct_1respondent has been disrespected:2 2.2613
## subgroupdisrspct_1respondent has been disrespected:3 0.6826
## age1(24,39]:1 1.6475
## age1(24,39]:2 2.3681
## age1(24,39]:3 5.2186
## age1(39,59]:1 1.7708
## age1(39,59]:2 1.4540
## age1(39,59]:3 4.5425
## age1(59,79]:1 1.6098
## age1(59,79]:2 0.5558
## age1(59,79]:3 4.7820
## age1(79,99]:1 0.3248
## age1(79,99]:2 -0.4650
## age1(79,99]:3 4.5602
## p
## (Intercept):1 0.003242
## (Intercept):2 0.122386
## (Intercept):3 < 2.2e-16
## subgrouphis_1Non Hispanic:1 0.001650
## subgrouphis_1Non Hispanic:2 1.837e-07
## subgrouphis_1Non Hispanic:3 0.023751
## subgroupsex_1Women:1 0.837014
## subgroupsex_1Women:2 0.338720
## subgroupsex_1Women:3 0.056289
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 0.328800
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 0.688937
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 0.820296
## subgroupdisrspct_1respondent has been disrespected:1 0.512545
## subgroupdisrspct_1respondent has been disrespected:2 0.023739
## subgroupdisrspct_1respondent has been disrespected:3 0.494850
## age1(24,39]:1 0.099458
## age1(24,39]:2 0.017881
## age1(24,39]:3 1.803e-07
## age1(39,59]:1 0.076593
## age1(39,59]:2 0.145946
## age1(39,59]:3 5.558e-06
## age1(59,79]:1 0.107436
## age1(59,79]:2 0.578319
## age1(59,79]:3 1.736e-06
## age1(79,99]:1 0.745307
## age1(79,99]:2 0.641960
## age1(79,99]:3 5.111e-06
summary(fit.allv2)
## svy_vglm.survey.design(as.ordered(AllEducLevels) ~ subgrouphis_1 +
## subgroupsex_1 + subgroupincom16_1 + subgroupborn_1 + subgroupnotsmart_1 +
## subgroupdisrspct_1 + age1, design = des, family = cumulative(parallel = F,
## reverse = T))
## Stratified Independent Sampling design (with replacement)
## svydesign(ids = ~1, strata = ~vstrat, weights = ~wtssnrps, data = gss2021_ZERODraft)
## Coef
## (Intercept):1 0.9343258
## (Intercept):2 -0.5784617
## (Intercept):3 -4.5057088
## subgrouphis_1Non Hispanic:1 0.9350170
## subgrouphis_1Non Hispanic:2 0.7733581
## subgrouphis_1Non Hispanic:3 0.4855402
## subgroupsex_1Women:1 0.0935240
## subgroupsex_1Women:2 -0.0819374
## subgroupsex_1Women:3 -0.1988551
## subgroupincom16_1secure economic resources at 16:1 0.4017130
## subgroupincom16_1secure economic resources at 16:2 0.4065278
## subgroupincom16_1secure economic resources at 16:3 0.3423570
## subgroupborn_1Not born in US:1 0.2285011
## subgroupborn_1Not born in US:2 0.2239336
## subgroupborn_1Not born in US:3 0.4263945
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 -0.2698159
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 -0.0163870
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 0.0096849
## subgroupdisrspct_1respondent has been disrespected:1 0.0273337
## subgroupdisrspct_1respondent has been disrespected:2 0.2438589
## subgroupdisrspct_1respondent has been disrespected:3 0.1194329
## age1(24,39]:1 0.6154665
## age1(24,39]:2 0.4730716
## age1(24,39]:3 2.4683476
## age1(39,59]:1 0.6411555
## age1(39,59]:2 0.2948268
## age1(39,59]:3 2.1391108
## age1(59,79]:1 0.5430693
## age1(59,79]:2 0.0683005
## age1(59,79]:3 2.2897996
## age1(79,99]:1 0.0881946
## age1(79,99]:2 -0.1159957
## age1(79,99]:3 2.4160660
## SE
## (Intercept):1 0.4310182
## (Intercept):2 0.2752018
## (Intercept):3 0.5337251
## subgrouphis_1Non Hispanic:1 0.2607338
## subgrouphis_1Non Hispanic:2 0.1680686
## subgrouphis_1Non Hispanic:3 0.2289665
## subgroupsex_1Women:1 0.1922000
## subgroupsex_1Women:2 0.0988023
## subgroupsex_1Women:3 0.1063120
## subgroupincom16_1secure economic resources at 16:1 0.2001693
## subgroupincom16_1secure economic resources at 16:2 0.1020903
## subgroupincom16_1secure economic resources at 16:3 0.1137320
## subgroupborn_1Not born in US:1 0.3250940
## subgroupborn_1Not born in US:2 0.1931003
## subgroupborn_1Not born in US:3 0.1777986
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 0.2805300
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 0.1205554
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 0.1291574
## subgroupdisrspct_1respondent has been disrespected:1 0.3087924
## subgroupdisrspct_1respondent has been disrespected:2 0.1325071
## subgroupdisrspct_1respondent has been disrespected:3 0.1483404
## age1(24,39]:1 0.3754966
## age1(24,39]:2 0.2373113
## age1(24,39]:3 0.4804805
## age1(39,59]:1 0.3647360
## age1(39,59]:2 0.2299310
## age1(39,59]:3 0.4799254
## age1(59,79]:1 0.3718621
## age1(59,79]:2 0.2301180
## age1(59,79]:3 0.4820338
## age1(79,99]:1 0.4956352
## age1(79,99]:2 0.2949985
## age1(79,99]:3 0.5231528
## z
## (Intercept):1 2.1677
## (Intercept):2 -2.1020
## (Intercept):3 -8.4420
## subgrouphis_1Non Hispanic:1 3.5861
## subgrouphis_1Non Hispanic:2 4.6014
## subgrouphis_1Non Hispanic:3 2.1206
## subgroupsex_1Women:1 0.4866
## subgroupsex_1Women:2 -0.8293
## subgroupsex_1Women:3 -1.8705
## subgroupincom16_1secure economic resources at 16:1 2.0069
## subgroupincom16_1secure economic resources at 16:2 3.9820
## subgroupincom16_1secure economic resources at 16:3 3.0102
## subgroupborn_1Not born in US:1 0.7029
## subgroupborn_1Not born in US:2 1.1597
## subgroupborn_1Not born in US:3 2.3982
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 -0.9618
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 -0.1359
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 0.0750
## subgroupdisrspct_1respondent has been disrespected:1 0.0885
## subgroupdisrspct_1respondent has been disrespected:2 1.8403
## subgroupdisrspct_1respondent has been disrespected:3 0.8051
## age1(24,39]:1 1.6391
## age1(24,39]:2 1.9935
## age1(24,39]:3 5.1372
## age1(39,59]:1 1.7579
## age1(39,59]:2 1.2822
## age1(39,59]:3 4.4572
## age1(59,79]:1 1.4604
## age1(59,79]:2 0.2968
## age1(59,79]:3 4.7503
## age1(79,99]:1 0.1779
## age1(79,99]:2 -0.3932
## age1(79,99]:3 4.6183
## p
## (Intercept):1 0.0301802
## (Intercept):2 0.0355572
## (Intercept):3 < 2.2e-16
## subgrouphis_1Non Hispanic:1 0.0003357
## subgrouphis_1Non Hispanic:2 4.196e-06
## subgrouphis_1Non Hispanic:3 0.0339578
## subgroupsex_1Women:1 0.6265437
## subgroupsex_1Women:2 0.4069310
## subgroupsex_1Women:3 0.0614162
## subgroupincom16_1secure economic resources at 16:1 0.0447639
## subgroupincom16_1secure economic resources at 16:2 6.833e-05
## subgroupincom16_1secure economic resources at 16:3 0.0026107
## subgroupborn_1Not born in US:1 0.4821324
## subgroupborn_1Not born in US:2 0.2461812
## subgroupborn_1Not born in US:3 0.0164764
## subgroupnotsmart_1respondent was told or treated as if they are not smart:1 0.3361463
## subgroupnotsmart_1respondent was told or treated as if they are not smart:2 0.8918773
## subgroupnotsmart_1respondent was told or treated as if they are not smart:3 0.9402266
## subgroupdisrspct_1respondent has been disrespected:1 0.9294648
## subgroupdisrspct_1respondent has been disrespected:2 0.0657175
## subgroupdisrspct_1respondent has been disrespected:3 0.4207462
## age1(24,39]:1 0.1011979
## age1(24,39]:2 0.0462106
## age1(24,39]:3 2.788e-07
## age1(39,59]:1 0.0787710
## age1(39,59]:2 0.1997584
## age1(39,59]:3 8.305e-06
## age1(59,79]:1 0.1441788
## age1(59,79]:2 0.7666142
## age1(59,79]:3 2.031e-06
## age1(79,99]:1 0.8587681
## age1(79,99]:2 0.6941661
## age1(79,99]:3 3.869e-06
-2*fit.hisonly$fit@criterion$loglikelihood + 2*length(fit.hisonly$coef)
## [1] 8763.337
-2*fit.hissex$fit@criterion$loglikelihood + 2*length(fit.hissex$coef)
## [1] 8727.063
-2*fit.perdiscrim$fit@criterion$loglikelihood + 2*length(fit.perdiscrim$coef)
## [1] 5633.483
-2*fit.allv$fit@criterion$loglikelihood + 2*length(fit.allv$coef)
## [1] 5402.184
-2*fit.hisonly2$fit@criterion$loglikelihood + 2*length(fit.hisonly2$coef)
## [1] 8728.602
-2*fit.hissex2$fit@criterion$loglikelihood + 2*length(fit.hissex2$coef)
## [1] 8689.992
-2*fit.perdiscrim2$fit@criterion$loglikelihood + 2*length(fit.perdiscrim2$coef)
## [1] 5610.107
-2*fit.allv2$fit@criterion$loglikelihood + 2*length(fit.allv2$coef)
## [1] 5377.354