All the variables in this dataset were compiled from a sample of the National Survey of College Graduates through the IPUMS-HigherEd site.
(Provide explanation of data)
The data used for this analysis consists of a sample from the National Survey of College Graduates gathered through IPUMS-Higher Ed.
Since my last update, I have made several changes: 1. I edited some of my graphs to make the information clearer 2. I made sure that only complete cases were being considered 3. I added a logit probit regression analysis, marginal effects and fitted values 4. Need to include a nested model analysis where I include one variable at a time using SVYGLM
library(car)
library(stargazer)
##
## Please cite as:
## Hlavac, Marek (2018). stargazer: Well-Formatted Regression and Summary Statistics Tables.
## R package version 5.2.1. https://CRAN.R-project.org/package=stargazer
library(survey)
## Loading required package: grid
## Loading required package: Matrix
## Loading required package: survival
##
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
##
## dotchart
library(ggplot2)
library(pander)
library(knitr)
library(haven)
cpsipums4<-read_dta("~/Statistics II/Data for project/highered/highered_00010.dta")
names(cpsipums4) #print the column names
## [1] "personid" "year" "weight" "sample" "surid" "age"
## [7] "gender" "minrty" "raceth" "bthus" "chtot" "dgrdg"
## [13] "lfstat" "hrswkgr" "jobins" "jobpens" "jobvac" "ocedrlp"
## [19] "prmbr" "salary"
#income grouping
cpsipums4$salary4<-ifelse(cpsipums4$salary==9999998:9999999, NA, cpsipums4$salary)
#number of children living in the household
cpsipums4$onechild<-recode(cpsipums4$chtot, recodes=01)
cpsipums4$twoormore<-recode(cpsipums4$chtot, recodes=03)
cpsipums4$chtot<-recode(cpsipums4$chtot, recodes="00='no children'; 01='one child'; 02='one to three children'; 03='two or more children'; 04='more than 3 children'; 98=NA", as.factor.result=T)
cpsipums4$chtot<-relevel(cpsipums4$chtot, ref = "one child")
table(cpsipums4$chtot)
##
## one child two or more children
## 14472 20517
#gender
cpsipums4$female<-recode(cpsipums4$gender, recodes=1)
cpsipums4$male<-recode(cpsipums4$gender, recodes=2)
cpsipums4$gender<-recode(cpsipums4$gender, recodes="1='female'; 2='male'", as.factor.result=T)
table(cpsipums4$gender)
##
## female male
## 38626 45830
cpsipums4$gender<-relevel(cpsipums4$gender, ref = "female")
#race/ethnicity
#There are no entries in this data set under "other"
cpsipums4$asian<-recode(cpsipums4$raceth, recodes=1)
cpsipums4$white<-recode(cpsipums4$raceth, recodes=2)
cpsipums4$minorities<-recode(cpsipums4$raceth, recodes=3)
cpsipums4$other<-recode(cpsipums4$raceth, recodes=4)
cpsipums4$raceth<-recode(cpsipums4$raceth, recodes="1='asian'; 2='white'; 3='minorities'", as.factor.result=T)
cpsipums4$raceth<-relevel(cpsipums4$raceth, ref = "white")
table(cpsipums4$raceth)
##
## white asian minorities
## 51846 13868 18742
#education level
cpsipums4$dgrdg<-recode(cpsipums4$dgrdg, recodes="1='0bachelors'; 2='1masters'; 3='2doctorate'; 4='3professional'", as.factor.result=T)
table(cpsipums4$dgrdg, cpsipums4$gender)
##
## female male
## 0bachelors 18930 25269
## 1masters 16756 16585
## 2doctorate 1103 1611
## 3professional 1837 2365
#place of birth (There are no NAs)
cpsipums4$birth<-recode (cpsipums4$bthus, recodes="00='not in the US'; 01='in the US'; 99='NA'", as.factor.result=T)
table(cpsipums4$birth, cpsipums4$gender)
##
## female male
## in the US 29873 34003
## not in the US 8753 11827
summary(cpsipums4$birth)
## in the US not in the US
## 63876 20580
#age
cpsipums4$agex<-cut(cpsipums4$age, breaks=c(22,29,39,49,59,76))
summary(cpsipums4$agex)
## (22,29] (29,39] (39,49] (49,59] (59,76]
## 19733 20888 15135 14870 13830
library(dplyr)
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:car':
##
## recode
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
analysisf<-cpsipums4%>%
select(chtot,gender,dgrdg, salary4, raceth,birth, agex, weight, sample) %>%
filter( complete.cases(.))
#DESIGN
options(survey.lonely.psu = "adjust")
des<-svydesign(ids=~1, strata=~sample, weights=~weight, data =analysisf)
The percentage of males with two children or more is higher than the observed percentage on the females. The opposite pattern is observed amongst the males with one child with a lower percentage than the females with one child.
library(ggplot2)
chi2<-svyby(formula = ~gender, by = ~chtot, design = des, FUN = svymean, na.rm=T)
svychisq(~gender+chtot, design = des)
##
## Pearson's X^2: Rao & Scott adjustment
##
## data: svychisq(~gender + chtot, design = des)
## F = 11.367, ndf = 1, ddf = 33054, p-value = 0.0007484
qplot(x=chi2$chtot,y=chi2$gendermale, data=chi2 ,xlab="children", ylab="males" )+
geom_errorbar(aes(x=chtot, ymin=gendermale,ymax=gendermale), width=.25)+
ggtitle(label = "% of Children for Males")
qplot(x=chi2$chtot,y=chi2$genderfemale, data=chi2 ,xlab="children", ylab="females" )+
geom_errorbar(aes(x=chtot, ymin=genderfemale,ymax=genderfemale), width=.25)+
ggtitle(label = "% of Children for Females")
###Percentage of Children Living in the Household by Level of Education A further comparison of genders confirms the pattern observed particularly when comparing men and women with a doctorate degree and a masters degree. However, this trend reverses when looking at participants with a professional degree; women are more likely to report having 2 or more children in the household than men.
fert2<-svyby(formula = ~gender, by = ~chtot+dgrdg, design = des, FUN = svymean,
na.rm=T)
fert2
## chtot dgrdg
## one child.0bachelors one child 0bachelors
## two or more children.0bachelors two or more children 0bachelors
## one child.1masters one child 1masters
## two or more children.1masters two or more children 1masters
## one child.2doctorate one child 2doctorate
## two or more children.2doctorate two or more children 2doctorate
## one child.3professional one child 3professional
## two or more children.3professional two or more children 3professional
## genderfemale gendermale se.genderfemale
## one child.0bachelors 0.4853431 0.5146569 0.012118676
## two or more children.0bachelors 0.4548979 0.5451021 0.009766875
## one child.1masters 0.5490740 0.4509260 0.013365448
## two or more children.1masters 0.4786395 0.5213605 0.011364902
## one child.2doctorate 0.3677776 0.6322224 0.035243843
## two or more children.2doctorate 0.3115621 0.6884379 0.035004491
## one child.3professional 0.3734310 0.6265690 0.028735349
## two or more children.3professional 0.4171900 0.5828100 0.022775215
## se.gendermale
## one child.0bachelors 0.012118676
## two or more children.0bachelors 0.009766875
## one child.1masters 0.013365448
## two or more children.1masters 0.011364902
## one child.2doctorate 0.035243843
## two or more children.2doctorate 0.035004491
## one child.3professional 0.028735349
## two or more children.3professional 0.022775215
fert2$chtot_rec<-rep(c("one child","two or more children"),2)
fert2$dgrdg_rec<-factor(c(rep("0bachelors", 2), rep("1masters", 2), rep("2doctorate", 2), rep("3professional", 2)), ordered = T)
#fix the order of the education factor levels
fert2$dgrdg_rec<-factor(fert2$dgrdg_rec, levels(fert2$dgrdg_rec)[c(4,3,2,1)])
#FEMALES
A<-ggplot(fert2, aes(dgrdg_rec,fert2$genderfemale),xlab="education", ylab="% gender")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("female")
A<-A+xlab("Education Level")
A+ggtitle("Percentage of Children in the Household for Females by Level of Education")
#MALES
B<-ggplot(fert2, aes(dgrdg_rec,fert2$gendermale),xlab="education", ylab="% gender")
B<-B+geom_point(aes(colour=chtot_rec))
B<-B+geom_line(aes(colour=chtot_rec,group=chtot_rec))
B<-B+ylab("male")
B<-B+xlab("Education Level")
B+ggtitle("Percentage of Children in the Household for Males by Level of Education")
###Percentage of Children Living in the Household by Gender by Place of Birth A comparison by gender and place of birth shows that females with a degree or higher who were born in the US are more likely to have one child than two or more. For women born outside of the US this trend is also found however, they are less likely to have one or two children in comparison to women born in the US.
A percentage comparison of males shows the opposite result. Men born outside the US are more likely to report having 2 or more children than men born in the US.
summary (cpsipums4$birth)
## in the US not in the US
## 63876 20580
fert3<-svyby(formula = ~gender, by = ~chtot+birth, design = des, FUN = svymean,
na.rm=T)
fert3
## chtot birth
## one child.in the US one child in the US
## two or more children.in the US two or more children in the US
## one child.not in the US one child not in the US
## two or more children.not in the US two or more children not in the US
## genderfemale gendermale se.genderfemale
## one child.in the US 0.5040787 0.4959213 0.009927896
## two or more children.in the US 0.4684676 0.5315324 0.008040635
## one child.not in the US 0.4588613 0.5411387 0.017823700
## two or more children.not in the US 0.4103194 0.5896806 0.014238504
## se.gendermale
## one child.in the US 0.009927896
## two or more children.in the US 0.008040635
## one child.not in the US 0.017823700
## two or more children.not in the US 0.014238504
fert3$chtot_rec<-rep(c("one child","two or more children"),2)
fert3$birth_rec<-factor(c(rep("intheUS", 2), rep("notintheUS", 2)), ordered = T)
#FEMALES
A<-ggplot(fert3, aes(birth_rec,fert3$genderfemale),xlab="place of birth", ylab="% gender")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("female")
A<-A+xlab("place of birth")
A+ggtitle("Percentage of Children in the Household for Females by Place of Birth")
#MALES
A<-ggplot(fert3, aes(birth_rec,fert3$gendermale),xlab="place of birth", ylab="% gender")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("male")
A<-A+xlab("place of birth")
A+ggtitle("Percentage of Children in the Household for Males by Place of Birth")
summary(cpsipums4$raceth)
## white asian minorities
## 51846 13868 18742
A look by race and ethnicity shows that the white participants are more likely to report having two or more children accross all level of education than one child, although the gap closes for those with a professional degree.For Asian participants, the trends reverses; they are more likely to report having one child accross all levels of education. Finally, the minority group shows some interesting findings. At the bacherlor’s level, the percentages between having one child or two or more are the same. When we look at minorities with a doctoral or master’s degree, they are more likely to report having one child however, those with a professional degree report having two or more children more often.
fert4<-svyby(formula = ~raceth, by = ~chtot+dgrdg, design = des, FUN = svymean,
na.rm=T)
fert4
## chtot dgrdg
## one child.0bachelors one child 0bachelors
## two or more children.0bachelors two or more children 0bachelors
## one child.1masters one child 1masters
## two or more children.1masters two or more children 1masters
## one child.2doctorate one child 2doctorate
## two or more children.2doctorate two or more children 2doctorate
## one child.3professional one child 3professional
## two or more children.3professional two or more children 3professional
## racethwhite racethasian
## one child.0bachelors 0.6888847 0.1350603
## two or more children.0bachelors 0.7135173 0.1091715
## one child.1masters 0.6867336 0.1486337
## two or more children.1masters 0.7154611 0.1330507
## one child.2doctorate 0.5641387 0.2772856
## two or more children.2doctorate 0.6060341 0.2640244
## one child.3professional 0.7137589 0.1702166
## two or more children.3professional 0.7331004 0.1224047
## racethminorities se.racethwhite
## one child.0bachelors 0.1760550 0.011245815
## two or more children.0bachelors 0.1773112 0.009069054
## one child.1masters 0.1646327 0.012330971
## two or more children.1masters 0.1514882 0.009597162
## one child.2doctorate 0.1585757 0.035852949
## two or more children.2doctorate 0.1299415 0.035129298
## one child.3professional 0.1160245 0.029384910
## two or more children.3professional 0.1444949 0.020312655
## se.racethasian se.racethminorities
## one child.0bachelors 0.008716328 0.008938225
## two or more children.0bachelors 0.006077858 0.007893575
## one child.1masters 0.007376316 0.011201061
## two or more children.1masters 0.005977261 0.008225005
## one child.2doctorate 0.028917783 0.030775820
## two or more children.2doctorate 0.031554218 0.022025402
## one child.3professional 0.026139335 0.019261312
## two or more children.3professional 0.016233077 0.015149141
fert4$chtot_rec<-rep(c("one child","two or more children"), 2)
fert4$dgrdg_rec<-factor(c(rep("0bachelors", 2), rep("1masters", 2), rep("2doctorate", 2), rep("3professional", 2)), ordered = T)
#WHITE
A<-ggplot(fert4, aes(dgrdg_rec,fert4$racethwhite),xlab="Education", ylab="% raceth")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("white")
A<-A+xlab("education")
A+ggtitle("Percentage of Children in the Household for White Participants")
#ASIAN
A<-ggplot(fert4, aes(dgrdg_rec,fert4$racethasian),xlab="Education", ylab="% raceth")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("asian")
A<-A+xlab("education")
A+ggtitle("Percentage of Children in the Household for Asian Participants")
#MINORITIES
A<-ggplot(fert4, aes(dgrdg_rec,fert4$racethminorities),xlab="Education", ylab="% raceth")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("minorities")
A<-A+xlab("education")
A+ggtitle("Percentage of Children in the Household for Minority Participants")
###Percentage of Children Living in the Household by Level of Education and Age
fert5<-svyby(formula = ~agex, by = ~chtot+dgrdg, design = des, FUN = svymean,
na.rm=T)
fert5
## chtot dgrdg
## one child.0bachelors one child 0bachelors
## two or more children.0bachelors two or more children 0bachelors
## one child.1masters one child 1masters
## two or more children.1masters two or more children 1masters
## one child.2doctorate one child 2doctorate
## two or more children.2doctorate two or more children 2doctorate
## one child.3professional one child 3professional
## two or more children.3professional two or more children 3professional
## agex(22,29] agex(29,39] agex(39,49]
## one child.0bachelors 0.084916897 0.2604747 0.2379903
## two or more children.0bachelors 0.026619483 0.2989384 0.4460329
## one child.1masters 0.042058365 0.3073539 0.2394416
## two or more children.1masters 0.014897293 0.3114695 0.4581626
## one child.2doctorate 0.021007793 0.2300460 0.2519192
## two or more children.2doctorate 0.009798909 0.1473169 0.5298643
## one child.3professional 0.036884474 0.3087137 0.2203852
## two or more children.3professional 0.001817110 0.3080378 0.4401284
## agex(49,59] agex(59,76] se.agex(22,29]
## one child.0bachelors 0.3072022 0.10941590 0.005698350
## two or more children.0bachelors 0.1933391 0.03507008 0.003257432
## one child.1masters 0.2970844 0.11406168 0.003759964
## two or more children.1masters 0.1858578 0.02961279 0.003262465
## one child.2doctorate 0.3196410 0.17738596 0.006008066
## two or more children.2doctorate 0.2501836 0.06283632 0.005805727
## one child.3professional 0.2966490 0.13736769 0.011332396
## two or more children.3professional 0.2122935 0.03772318 0.001022241
## se.agex(29,39] se.agex(39,49]
## one child.0bachelors 0.010495659 0.010526028
## two or more children.0bachelors 0.008947375 0.009687734
## one child.1masters 0.012658972 0.011504499
## two or more children.1masters 0.010786603 0.011322065
## one child.2doctorate 0.027666242 0.028337053
## two or more children.2doctorate 0.020706756 0.036293467
## one child.3professional 0.029173513 0.026437091
## two or more children.3professional 0.020820491 0.022683238
## se.agex(49,59] se.agex(59,76]
## one child.0bachelors 0.011406319 0.007455153
## two or more children.0bachelors 0.007425502 0.004398085
## one child.1masters 0.012863875 0.008610580
## two or more children.1masters 0.008767519 0.003448715
## one child.2doctorate 0.036378670 0.031501549
## two or more children.2doctorate 0.031033182 0.014033204
## one child.3professional 0.028947629 0.017081905
## two or more children.3professional 0.018071830 0.007998897
fert5$chtot_rec<-rep(c("one child","two or more children"), 2)
fert5$dgrdg_rec<-factor(c(rep("0bachelors", 2), rep("1masters", 2), rep("2doctorate", 2), rep("3professional", 2)), ordered = T)
#22-29
A<-ggplot(fert5, aes(dgrdg_rec,fert5$`agex(22,29]`),xlab="Education", ylab="% agex")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("20-29")
A<-A+xlab("education")
A+ggtitle("Percentage of Children in the Household for Participants Ages 20-29")
#29-39
A<-ggplot(fert5, aes(dgrdg_rec,fert5$`agex(29,39]`),xlab="Education", ylab="% agex")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("29-39")
A<-A+xlab("education")
A+ggtitle("Percentage of Children in the Household for Participants Ages 29-39")
#39-49
A<-ggplot(fert5, aes(dgrdg_rec,fert5$`agex(39,49]`),xlab="Education", ylab="% agex")
A<-A+geom_point(aes(colour=chtot_rec))
A<-A+geom_line(aes(colour=chtot_rec,group=chtot_rec))
A<-A+ylab("39-49")
A<-A+xlab("education")
A+ggtitle("Percentage of Children in the Household for Participants Ages 39-49")
##Basic Chi-Square Test of Indendendence We compute chi-square analyses to observe all the various interactions with the number of children. Only complete cases are considered below. All interactions show significant effects.
#column percentages of number of children by gender
prop.table(table(analysisf$chtot, analysisf$gender), margin=2)
##
## female male
## one child 0.4383372 0.3892748
## two or more children 0.5616628 0.6107252
chisq.test(table(analysisf$chtot, analysisf$gender))
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: table(analysisf$chtot, analysisf$gender)
## X-squared = 80.724, df = 1, p-value < 2.2e-16
#column percentages of number of children by race/ethcnitiy
prop.table(table(analysisf$chtot, analysisf$raceth), margin=2)
##
## white asian minorities
## one child 0.3999401 0.4423340 0.4152755
## two or more children 0.6000599 0.5576660 0.5847245
chisq.test(table(analysisf$chtot, analysisf$raceth))
##
## Pearson's Chi-squared test
##
## data: table(analysisf$chtot, analysisf$raceth)
## X-squared = 34.361, df = 2, p-value = 3.456e-08
#column percentages of number of children by place of birth
prop.table(table(analysisf$chtot, analysisf$birth), margin=2)
##
## in the US not in the US
## one child 0.4068951 0.4204992
## two or more children 0.5931049 0.5795008
chisq.test(table(analysisf$chtot, analysisf$birth))
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: table(analysisf$chtot, analysisf$birth)
## X-squared = 5.0925, df = 1, p-value = 0.02403
#column percentages of number of children by level of education
prop.table(table(analysisf$chtot, analysisf$dgrdg), margin=2)
##
## 0bachelors 1masters 2doctorate 3professional
## one child 0.4018663 0.4217992 0.4538813 0.3824541
## two or more children 0.5981337 0.5782008 0.5461187 0.6175459
chisq.test(table(analysisf$chtot, analysisf$dgrdg))
##
## Pearson's Chi-squared test
##
## data: table(analysisf$chtot, analysisf$dgrdg)
## X-squared = 26.464, df = 3, p-value = 7.625e-06
#column percentages of number of children by level of age
prop.table(table(analysisf$chtot, analysisf$agex), margin=2)
##
## (22,29] (29,39] (39,49] (49,59] (59,76]
## one child 0.6639723 0.4043690 0.2565076 0.4891676 0.6762626
## two or more children 0.3360277 0.5956310 0.7434924 0.5108324 0.3237374
chisq.test(table(analysisf$chtot, analysisf$agex))
##
## Pearson's Chi-squared test
##
## data: table(analysisf$chtot, analysisf$agex)
## X-squared = 2506.1, df = 4, p-value < 2.2e-16
#column percentages of education level by age
prop.table(table(analysisf$dgrdg, analysisf$agex), margin=2)
##
## (22,29] (29,39] (39,49] (49,59] (59,76]
## 0bachelors 0.67397998 0.43858991 0.50486336 0.53577537 0.49090909
## 1masters 0.29984604 0.48687418 0.40083372 0.36416762 0.37979798
## 2doctorate 0.01539646 0.02653291 0.03881427 0.03720068 0.04646465
## 3professional 0.01077752 0.04800300 0.05548865 0.06285633 0.08282828
chisq.test(table(analysisf$dgrdg, analysisf$agex))
##
## Pearson's Chi-squared test
##
## data: table(analysisf$dgrdg, analysisf$agex)
## X-squared = 730.46, df = 12, p-value < 2.2e-16
A logit/probit analysis shows similar patterns than those mentioned during the descriptive analysis: 1. Men are more likely than women to have two children or more 2. Men and Women with a masters and doctoral degree are less likely to have two or more children than those with a bachelors. However, men and women with a professional degree are more likely to have two children or more. 3.Both Asian and Minority groups are less likely to report having two or more children when compared to the white group. 4. Men and women who were not born in the US are most likely as group to report having two or more children when compared to those born in the US.
These findings are grouping men and women together.
#Logit model
fit.logit<-svyglm(chtot~gender+dgrdg+raceth+birth+agex, design= des, family=binomial)
## Warning in eval(family$initialize): non-integer #successes in a binomial
## glm!
#probit model
fit.probit<-svyglm(chtot~gender+dgrdg+raceth+birth+agex, design=des, family=binomial(link= "probit"))
## Warning in eval(family$initialize): non-integer #successes in a binomial
## glm!
stargazer(fit.logit, fit.probit,type = "html", style="demography",covariate.labels=c("male","1masters","2doctorate","3professional", "asian","minorities", "not in the US","age"))
| chtot | ||
| survey-weighted | survey-weighted | |
| logistic | probit | |
| Model 1 | Model 2 | |
| male | 0.213*** | 0.131*** |
| (0.047) | (0.029) | |
| 1masters | -0.100* | -0.060* |
| (0.050) | (0.030) | |
| 2doctorate | -0.138 | -0.083 |
| (0.111) | (0.068) | |
| 3professional | 0.069 | 0.043 |
| (0.087) | (0.053) | |
| asian | -0.312*** | -0.189*** |
| (0.087) | (0.053) | |
| minorities | -0.013 | -0.010 |
| (0.070) | (0.042) | |
| not in the US | 0.002 | -0.001 |
| (0.072) | (0.044) | |
| age | 1.261*** | 0.784*** |
| (0.128) | (0.078) | |
| agex(39,49] | 1.807*** | 1.112*** |
| (0.128) | (0.078) | |
| agex(49,59] | 0.694*** | 0.431*** |
| (0.129) | (0.079) | |
| agex(59,76] | -0.095 | -0.058 |
| (0.157) | (0.096) | |
| Constant | -0.677*** | -0.421*** |
| (0.124) | (0.076) | |
| N | 33,055 | 33,055 |
| Log Likelihood | -18,717.770 | -18,717.060 |
| AIC | 37,459.540 | 37,458.120 |
| p < .05; p < .01; p < .001 | ||
The marginal effects are similar with both the Logit and Probit models.
#Logit marginal effects
log.marg<-coef(fit.logit)*mean(dlogis(predict(fit.logit)), na.rm=T)
#Probit marginal effects
prob.marg<-coef(fit.probit)*mean(dnorm(predict(fit.probit)), na.rm=T)
plot(log.marg[-1], ylab="Marginal Effects", axes=T,xaxt="n", main="Marginal Effects from Logit and Probit models", ylim=c(-.25, .2))
axis(side=1, at=1:13, labels=F)
text(x=1:13, y=-.3, srt = 45, pos = 1, xpd = TRUE,
labels = c("male","1masters","2doctorate","3professional", "asian","minorities", "not in the US","age"))
points(prob.marg[-1], col=2)
abline(h=0, col=2)
legend("bottomright", legend=c("Logit Model", "Probit Model"), col=c("black", "red"),pch=1)
The marginal effects allows us to take a closer look at the differences between the groups discussed previously.
data.frame(m.logit=log.marg, m.probit=prob.marg)
## m.logit m.probit
## (Intercept) -0.1468961612 -0.149744299
## gendermale 0.0462312479 0.046589485
## dgrdg1masters -0.0217868996 -0.021521175
## dgrdg2doctorate -0.0298533452 -0.029395878
## dgrdg3professional 0.0149266697 0.015311469
## racethasian -0.0677122165 -0.067206354
## racethminorities -0.0028614057 -0.003581489
## birthnot in the US 0.0003619161 -0.000360743
## agex(29,39] 0.2735336466 0.279029256
## agex(39,49] 0.3919552309 0.395951170
## agex(49,59] 0.1504290663 0.153605057
## agex(59,76] -0.0206245231 -0.020536173
#get a series of predicted probabilites for different "types" of people for each model
#expand.grid will generate all possible combinations of values you specify
dat<-expand.grid(gender=levels(factor(analysisf$gender)),dgrdg=levels(factor(analysisf$dgrdg)), chtot=levels(factor(analysisf$chtot)),raceth=levels(factor(analysisf$raceth)),birth=levels(factor(analysisf$birth)),agex=levels(factor(analysisf$agex)))
summary (dat)
## gender dgrdg chtot
## female:240 0bachelors :120 one child :240
## male :240 1masters :120 two or more children:240
## 2doctorate :120
## 3professional:120
##
## raceth birth agex
## white :160 in the US :240 (22,29]:96
## asian :160 not in the US:240 (29,39]:96
## minorities:160 (39,49]:96
## (49,59]:96
## (59,76]:96
fit<-predict(fit.logit, newdata=dat, type="response")
fit2<-predict(fit.probit, newdata=dat, type="response")
dat$fitted.prob.lrm<-round(fit, 3)
dat$fitted.prob.pro<-round(fit2, 3)
head(dat, n=48)
## gender dgrdg chtot raceth birth agex
## 1 female 0bachelors one child white in the US (22,29]
## 2 male 0bachelors one child white in the US (22,29]
## 3 female 1masters one child white in the US (22,29]
## 4 male 1masters one child white in the US (22,29]
## 5 female 2doctorate one child white in the US (22,29]
## 6 male 2doctorate one child white in the US (22,29]
## 7 female 3professional one child white in the US (22,29]
## 8 male 3professional one child white in the US (22,29]
## 9 female 0bachelors two or more children white in the US (22,29]
## 10 male 0bachelors two or more children white in the US (22,29]
## 11 female 1masters two or more children white in the US (22,29]
## 12 male 1masters two or more children white in the US (22,29]
## 13 female 2doctorate two or more children white in the US (22,29]
## 14 male 2doctorate two or more children white in the US (22,29]
## 15 female 3professional two or more children white in the US (22,29]
## 16 male 3professional two or more children white in the US (22,29]
## 17 female 0bachelors one child asian in the US (22,29]
## 18 male 0bachelors one child asian in the US (22,29]
## 19 female 1masters one child asian in the US (22,29]
## 20 male 1masters one child asian in the US (22,29]
## 21 female 2doctorate one child asian in the US (22,29]
## 22 male 2doctorate one child asian in the US (22,29]
## 23 female 3professional one child asian in the US (22,29]
## 24 male 3professional one child asian in the US (22,29]
## 25 female 0bachelors two or more children asian in the US (22,29]
## 26 male 0bachelors two or more children asian in the US (22,29]
## 27 female 1masters two or more children asian in the US (22,29]
## 28 male 1masters two or more children asian in the US (22,29]
## 29 female 2doctorate two or more children asian in the US (22,29]
## 30 male 2doctorate two or more children asian in the US (22,29]
## 31 female 3professional two or more children asian in the US (22,29]
## 32 male 3professional two or more children asian in the US (22,29]
## 33 female 0bachelors one child minorities in the US (22,29]
## 34 male 0bachelors one child minorities in the US (22,29]
## 35 female 1masters one child minorities in the US (22,29]
## 36 male 1masters one child minorities in the US (22,29]
## 37 female 2doctorate one child minorities in the US (22,29]
## 38 male 2doctorate one child minorities in the US (22,29]
## 39 female 3professional one child minorities in the US (22,29]
## 40 male 3professional one child minorities in the US (22,29]
## 41 female 0bachelors two or more children minorities in the US (22,29]
## 42 male 0bachelors two or more children minorities in the US (22,29]
## 43 female 1masters two or more children minorities in the US (22,29]
## 44 male 1masters two or more children minorities in the US (22,29]
## 45 female 2doctorate two or more children minorities in the US (22,29]
## 46 male 2doctorate two or more children minorities in the US (22,29]
## 47 female 3professional two or more children minorities in the US (22,29]
## 48 male 3professional two or more children minorities in the US (22,29]
## fitted.prob.lrm fitted.prob.pro
## 1 0.337 0.337
## 2 0.386 0.386
## 3 0.315 0.315
## 4 0.362 0.363
## 5 0.307 0.307
## 6 0.354 0.355
## 7 0.352 0.353
## 8 0.402 0.403
## 9 0.337 0.337
## 10 0.386 0.386
## 11 0.315 0.315
## 12 0.362 0.363
## 13 0.307 0.307
## 14 0.354 0.355
## 15 0.352 0.353
## 16 0.402 0.403
## 17 0.271 0.271
## 18 0.315 0.316
## 19 0.252 0.252
## 20 0.294 0.295
## 21 0.245 0.245
## 22 0.286 0.287
## 23 0.285 0.286
## 24 0.330 0.332
## 25 0.271 0.271
## 26 0.315 0.316
## 27 0.252 0.252
## 28 0.294 0.295
## 29 0.245 0.245
## 30 0.286 0.287
## 31 0.285 0.286
## 32 0.330 0.332
## 33 0.334 0.333
## 34 0.383 0.382
## 35 0.312 0.312
## 36 0.359 0.359
## 37 0.304 0.304
## 38 0.351 0.351
## 39 0.349 0.349
## 40 0.399 0.399
## 41 0.334 0.333
## 42 0.383 0.382
## 43 0.312 0.312
## 44 0.359 0.359
## 45 0.304 0.304
## 46 0.351 0.351
## 47 0.349 0.349
## 48 0.399 0.399
We explore a few of the interesting cases presented in the fitted values.
#Professional Degree - Ages 22-29
dat[which(dat$gender=="female"&dat$chtot=="two or more children"&dat$dgrdg=="3professional"&dat$agex=="(22,29]"),]
## gender dgrdg chtot raceth birth
## 15 female 3professional two or more children white in the US
## 31 female 3professional two or more children asian in the US
## 47 female 3professional two or more children minorities in the US
## 63 female 3professional two or more children white not in the US
## 79 female 3professional two or more children asian not in the US
## 95 female 3professional two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 15 (22,29] 0.352 0.353
## 31 (22,29] 0.285 0.286
## 47 (22,29] 0.349 0.349
## 63 (22,29] 0.353 0.353
## 79 (22,29] 0.285 0.285
## 95 (22,29] 0.350 0.349
dat[which(dat$gender=="male"&dat$chtot=="two or more children"&dat$dgrdg=="3professional"&dat$agex=="(22,29]"),]
## gender dgrdg chtot raceth birth
## 16 male 3professional two or more children white in the US
## 32 male 3professional two or more children asian in the US
## 48 male 3professional two or more children minorities in the US
## 64 male 3professional two or more children white not in the US
## 80 male 3professional two or more children asian not in the US
## 96 male 3professional two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 16 (22,29] 0.402 0.403
## 32 (22,29] 0.330 0.332
## 48 (22,29] 0.399 0.399
## 64 (22,29] 0.403 0.402
## 80 (22,29] 0.331 0.331
## 96 (22,29] 0.400 0.398
#Professional Degree - Ages 39-49
dat[which(dat$gender=="female"&dat$chtot=="two or more children"&dat$dgrdg=="3professional"&dat$agex=="(39,49]"),]
## gender dgrdg chtot raceth birth
## 207 female 3professional two or more children white in the US
## 223 female 3professional two or more children asian in the US
## 239 female 3professional two or more children minorities in the US
## 255 female 3professional two or more children white not in the US
## 271 female 3professional two or more children asian not in the US
## 287 female 3professional two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 207 (39,49] 0.768 0.769
## 223 (39,49] 0.708 0.707
## 239 (39,49] 0.766 0.766
## 255 (39,49] 0.769 0.768
## 271 (39,49] 0.709 0.707
## 287 (39,49] 0.766 0.765
dat[which(dat$gender=="male"&dat$chtot=="two or more children"&dat$dgrdg=="3professional"&dat$agex=="(39,49]"),]
## gender dgrdg chtot raceth birth
## 208 male 3professional two or more children white in the US
## 224 male 3professional two or more children asian in the US
## 240 male 3professional two or more children minorities in the US
## 256 male 3professional two or more children white not in the US
## 272 male 3professional two or more children asian not in the US
## 288 male 3professional two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 208 (39,49] 0.804 0.807
## 224 (39,49] 0.750 0.751
## 240 (39,49] 0.802 0.804
## 256 (39,49] 0.804 0.806
## 272 (39,49] 0.751 0.750
## 288 (39,49] 0.802 0.804
#Professional Degree - Ages 49-59
dat[which(dat$gender=="female"&dat$chtot=="two or more children"&dat$dgrdg=="3professional"&dat$agex=="(49,59]"),]
## gender dgrdg chtot raceth birth
## 303 female 3professional two or more children white in the US
## 319 female 3professional two or more children asian in the US
## 335 female 3professional two or more children minorities in the US
## 351 female 3professional two or more children white not in the US
## 367 female 3professional two or more children asian not in the US
## 383 female 3professional two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 303 (49,59] 0.521 0.521
## 319 (49,59] 0.443 0.446
## 335 (49,59] 0.518 0.517
## 351 (49,59] 0.522 0.521
## 367 (49,59] 0.444 0.446
## 383 (49,59] 0.518 0.517
dat[which(dat$gender=="male"&dat$chtot=="two or more children"&dat$dgrdg=="3professional"&dat$agex=="(49,59]"),]
## gender dgrdg chtot raceth birth
## 304 male 3professional two or more children white in the US
## 320 male 3professional two or more children asian in the US
## 336 male 3professional two or more children minorities in the US
## 352 male 3professional two or more children white not in the US
## 368 male 3professional two or more children asian not in the US
## 384 male 3professional two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 304 (49,59] 0.574 0.573
## 320 (49,59] 0.497 0.498
## 336 (49,59] 0.571 0.569
## 352 (49,59] 0.574 0.573
## 368 (49,59] 0.497 0.498
## 384 (49,59] 0.571 0.569
#Doctoral Degree - Ages 22-29
dat[which(dat$gender=="female"&dat$chtot=="two or more children"&dat$dgrdg=="2doctorate"&dat$agex=="(22,29]"),]
## gender dgrdg chtot raceth birth agex
## 13 female 2doctorate two or more children white in the US (22,29]
## 29 female 2doctorate two or more children asian in the US (22,29]
## 45 female 2doctorate two or more children minorities in the US (22,29]
## 61 female 2doctorate two or more children white not in the US (22,29]
## 77 female 2doctorate two or more children asian not in the US (22,29]
## 93 female 2doctorate two or more children minorities not in the US (22,29]
## fitted.prob.lrm fitted.prob.pro
## 13 0.307 0.307
## 29 0.245 0.245
## 45 0.304 0.304
## 61 0.307 0.307
## 77 0.245 0.244
## 93 0.304 0.304
dat[which(dat$gender=="male"&dat$chtot=="two or more children"&dat$dgrdg=="2doctorate"&dat$agex=="(22,29]"),]
## gender dgrdg chtot raceth birth agex
## 14 male 2doctorate two or more children white in the US (22,29]
## 30 male 2doctorate two or more children asian in the US (22,29]
## 46 male 2doctorate two or more children minorities in the US (22,29]
## 62 male 2doctorate two or more children white not in the US (22,29]
## 78 male 2doctorate two or more children asian not in the US (22,29]
## 94 male 2doctorate two or more children minorities not in the US (22,29]
## fitted.prob.lrm fitted.prob.pro
## 14 0.354 0.355
## 30 0.286 0.287
## 46 0.351 0.351
## 62 0.354 0.354
## 78 0.287 0.287
## 94 0.351 0.351
#Doctoral Degree - Ages 39-49
dat[which(dat$gender=="female"&dat$chtot=="two or more children"&dat$dgrdg=="2doctorate"&dat$agex=="(39,49]"),]
## gender dgrdg chtot raceth birth
## 205 female 2doctorate two or more children white in the US
## 221 female 2doctorate two or more children asian in the US
## 237 female 2doctorate two or more children minorities in the US
## 253 female 2doctorate two or more children white not in the US
## 269 female 2doctorate two or more children asian not in the US
## 285 female 2doctorate two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 205 (39,49] 0.730 0.729
## 221 (39,49] 0.664 0.663
## 237 (39,49] 0.727 0.725
## 253 (39,49] 0.730 0.728
## 269 (39,49] 0.664 0.662
## 285 (39,49] 0.727 0.725
dat[which(dat$gender=="male"&dat$chtot=="two or more children"&dat$dgrdg=="2doctorate"&dat$agex=="(39,49]"),]
## gender dgrdg chtot raceth birth
## 206 male 2doctorate two or more children white in the US
## 222 male 2doctorate two or more children asian in the US
## 238 male 2doctorate two or more children minorities in the US
## 254 male 2doctorate two or more children white not in the US
## 270 male 2doctorate two or more children asian not in the US
## 286 male 2doctorate two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 206 (39,49] 0.769 0.770
## 222 (39,49] 0.710 0.709
## 238 (39,49] 0.767 0.767
## 254 (39,49] 0.770 0.770
## 270 (39,49] 0.710 0.709
## 286 (39,49] 0.767 0.767
#Doctoral Degree - Ages 49-59
dat[which(dat$gender=="female"&dat$chtot=="two or more children"&dat$dgrdg=="2doctorate"&dat$agex=="(49,59]"),]
## gender dgrdg chtot raceth birth
## 301 female 2doctorate two or more children white in the US
## 317 female 2doctorate two or more children asian in the US
## 333 female 2doctorate two or more children minorities in the US
## 349 female 2doctorate two or more children white not in the US
## 365 female 2doctorate two or more children asian not in the US
## 381 female 2doctorate two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 301 (49,59] 0.470 0.471
## 317 (49,59] 0.393 0.397
## 333 (49,59] 0.466 0.467
## 349 (49,59] 0.470 0.471
## 365 (49,59] 0.394 0.397
## 381 (49,59] 0.467 0.467
dat[which(dat$gender=="male"&dat$chtot=="two or more children"&dat$dgrdg=="2doctorate"&dat$agex=="(49,59]"),]
## gender dgrdg chtot raceth birth
## 302 male 2doctorate two or more children white in the US
## 318 male 2doctorate two or more children asian in the US
## 334 male 2doctorate two or more children minorities in the US
## 350 male 2doctorate two or more children white not in the US
## 366 male 2doctorate two or more children asian not in the US
## 382 male 2doctorate two or more children minorities not in the US
## agex fitted.prob.lrm fitted.prob.pro
## 302 (49,59] 0.523 0.524
## 318 (49,59] 0.445 0.448
## 334 (49,59] 0.520 0.520
## 350 (49,59] 0.523 0.523
## 366 (49,59] 0.446 0.448
## 382 (49,59] 0.520 0.519
Each model under this analysis increases in complexity. The first model considers number of children and gender. The second model includes number of children, gender and level of education. The third model includes number of children, gender, education and adds race/ethnicity. The last model, includes number of children, gender, education, race and place of birth.
model1<-lm(scale(salary4)~chtot+gender, data=analysisf)
model2<-lm(scale(salary4)~chtot+gender+dgrdg, data=analysisf)
model3<-lm(scale(salary4)~chtot+gender+dgrdg+raceth, data=analysisf)
model4<-lm(scale(salary4)~chtot+gender+dgrdg+raceth+agex, data=analysisf)
model5<-lm(scale(salary4)~chtot+gender+dgrdg+raceth+agex+birth, data=analysisf)
anova(model1,model2, model3, model4, model5)
## Analysis of Variance Table
##
## Model 1: scale(salary4) ~ chtot + gender
## Model 2: scale(salary4) ~ chtot + gender + dgrdg
## Model 3: scale(salary4) ~ chtot + gender + dgrdg + raceth
## Model 4: scale(salary4) ~ chtot + gender + dgrdg + raceth + agex
## Model 5: scale(salary4) ~ chtot + gender + dgrdg + raceth + agex + birth
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 33052 32475
## 2 33049 32401 3 73.80 25.731 < 2.2e-16 ***
## 3 33047 32347 2 54.05 28.267 5.423e-13 ***
## 4 33043 31631 4 716.41 187.348 < 2.2e-16 ***
## 5 33042 31588 1 42.86 44.831 2.182e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AICs<-AIC(model1, model2, model3, model4, model5)
AICs$diff<-AICs$AIC-AICs$AIC[1]
AICs
## df AIC diff
## model1 4 93228.85 0.0000
## model2 7 93159.65 -69.1987
## model3 9 93108.47 -120.3816
## model4 13 92376.15 -852.6985
## model5 14 92333.33 -895.5171
library(stargazer)
summary(model1)
Call: lm(formula = scale(salary4) ~ chtot + gender, data = analysisf)
Residuals: Min 1Q Median 3Q Max -0.4552 -0.3963 -0.1570 -0.1185 4.1036
Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.17015 0.01033 16.473 < 2e-16 chtottwo or more children -0.03888 0.01110 -3.504 0.000459 gendermale -0.26206 0.01100 -23.819 < 2e-16 *** — Signif. codes: 0 ‘’ 0.001 ’’ 0.01 ’’ 0.05 ‘.’ 0.1 ‘’ 1
Residual standard error: 0.9912 on 33052 degrees of freedom Multiple R-squared: 0.01752, Adjusted R-squared: 0.01746 F-statistic: 294.7 on 2 and 33052 DF, p-value: < 2.2e-16
summary(model2)
Call: lm(formula = scale(salary4) ~ chtot + gender + dgrdg, data = analysisf)
Residuals: Min 1Q Median 3Q Max -0.5054 -0.3762 -0.1842 -0.0997 4.1774
Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.22036 0.01188 18.548 < 2e-16 chtottwo or more children -0.04020 0.01109 -3.625 0.000289 gendermale -0.26696 0.01103 -24.213 < 2e-16 dgrdg1masters -0.09006 0.01148 -7.845 4.45e-15 dgrdg2doctorate -0.10240 0.03091 -3.313 0.000925 dgrdg3professional -0.11779 0.02493 -4.726 2.30e-06 — Signif. codes: 0 ‘’ 0.001 ’’ 0.01 ’’ 0.05 ‘.’ 0.1 ‘’ 1
Residual standard error: 0.9902 on 33049 degrees of freedom Multiple R-squared: 0.01975, Adjusted R-squared: 0.0196 F-statistic: 133.2 on 5 and 33049 DF, p-value: < 2.2e-16
summary(model3)
Call: lm(formula = scale(salary4) ~ chtot + gender + dgrdg + raceth, data = analysisf)
Residuals: Min 1Q Median 3Q Max -0.5931 -0.3689 -0.1860 -0.1071 4.1997
Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.19826 0.01280 15.484 < 2e-16 chtottwo or more children -0.03776 0.01108 -3.406 0.000659 gendermale -0.26753 0.01107 -24.169 < 2e-16 dgrdg1masters -0.09569 0.01150 -8.322 < 2e-16 dgrdg2doctorate -0.11993 0.03098 -3.871 0.000109 dgrdg3professional -0.11886 0.02491 -4.772 1.83e-06 racethasian 0.10976 0.01478 7.426 1.15e-13 *** racethminorities 0.02086 0.01367 1.526 0.126903
— Signif. codes: 0 ‘’ 0.001 ’’ 0.01 ’’ 0.05 ‘.’ 0.1 ‘’ 1
Residual standard error: 0.9894 on 33047 degrees of freedom Multiple R-squared: 0.02139, Adjusted R-squared: 0.02118 F-statistic: 103.2 on 7 and 33047 DF, p-value: < 2.2e-16
summary(model4)
Call: lm(formula = scale(salary4) ~ chtot + gender + dgrdg + raceth + agex, data = analysisf)
Residuals: Min 1Q Median 3Q Max -1.1776 -0.3705 -0.1639 -0.0600 4.2985
Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.24753 0.02115 11.703 < 2e-16 chtottwo or more children 0.02182 0.01142 1.911 0.056 .
gendermale -0.28672 0.01105 -25.939 < 2e-16 dgrdg1masters -0.09075 0.01146 -7.921 2.42e-15 dgrdg2doctorate -0.12346 0.03067 -4.025 5.71e-05 dgrdg3professional -0.13159 0.02471 -5.326 1.01e-07 racethasian 0.12646 0.01466 8.624 < 2e-16 racethminorities 0.02111 0.01354 1.559 0.119
agex(29,39] -0.10313 0.02182 -4.726 2.30e-06 agex(39,49] -0.15494 0.02209 -7.013 2.37e-12 agex(49,59] -0.11178 0.02278 -4.908 9.26e-07 agex(59,76] 0.49669 0.02950 16.836 < 2e-16 — Signif. codes: 0 ‘’ 0.001 ’’ 0.01 ’’ 0.05 ‘.’ 0.1 ‘’ 1
Residual standard error: 0.9784 on 33043 degrees of freedom Multiple R-squared: 0.04306, Adjusted R-squared: 0.04274 F-statistic: 135.2 on 11 and 33043 DF, p-value: < 2.2e-16
summary(model5)
Call: lm(formula = scale(salary4) ~ chtot + gender + dgrdg + raceth + agex + birth, data = analysisf)
Residuals: Min 1Q Median 3Q Max -1.1983 -0.3702 -0.1898 -0.0570 4.3103
Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.245593 0.021139 11.618 < 2e-16 chtottwo or more children 0.021919 0.011408 1.921 0.05470 .
gendermale -0.290836 0.011063 -26.288 < 2e-16 dgrdg1masters -0.094762 0.011464 -8.266 < 2e-16 dgrdg2doctorate -0.154343 0.030999 -4.979 6.42e-07 dgrdg3professional -0.130170 0.024692 -5.272 1.36e-07 racethasian 0.050609 0.018521 2.732 0.00629 racethminorities 0.001881 0.013833 0.136 0.89182
agex(29,39] -0.106133 0.021815 -4.865 1.15e-06 agex(39,49] -0.162149 0.022103 -7.336 2.25e-13 agex(49,59] -0.117977 0.022780 -5.179 2.24e-07 agex(59,76] 0.492283 0.029489 16.694 < 2e-16 birthnot in the US 0.102838 0.015359 6.696 2.18e-11 ** — Signif. codes: 0 ‘’ 0.001 ’’ 0.01 ’’ 0.05 ‘.’ 0.1 ‘’ 1
Residual standard error: 0.9777 on 33042 degrees of freedom Multiple R-squared: 0.04436, Adjusted R-squared: 0.04401 F-statistic: 127.8 on 12 and 33042 DF, p-value: < 2.2e-16
stargazer(model1, model2, model3, model4, model5, type = "html", style = "demography", ci = T)
| scale(salary4) | |||||
| Model 1 | Model 2 | Model 3 | Model 4 | Model 5 | |
| chtottwo or more children | -0.039*** | -0.040*** | -0.038*** | 0.022 | 0.022 |
| (-0.061, -0.017) | (-0.062, -0.018) | (-0.059, -0.016) | (-0.001, 0.044) | (-0.0004, 0.044) | |
| gendermale | -0.262*** | -0.267*** | -0.268*** | -0.287*** | -0.291*** |
| (-0.284, -0.240) | (-0.289, -0.245) | (-0.289, -0.246) | (-0.308, -0.265) | (-0.313, -0.269) | |
| dgrdg1masters | -0.090*** | -0.096*** | -0.091*** | -0.095*** | |
| (-0.113, -0.068) | (-0.118, -0.073) | (-0.113, -0.068) | (-0.117, -0.072) | ||
| dgrdg2doctorate | -0.102*** | -0.120*** | -0.123*** | -0.154*** | |
| (-0.163, -0.042) | (-0.181, -0.059) | (-0.184, -0.063) | (-0.215, -0.094) | ||
| dgrdg3professional | -0.118*** | -0.119*** | -0.132*** | -0.130*** | |
| (-0.167, -0.069) | (-0.168, -0.070) | (-0.180, -0.083) | (-0.179, -0.082) | ||
| racethasian | 0.110*** | 0.126*** | 0.051** | ||
| (0.081, 0.139) | (0.098, 0.155) | (0.014, 0.087) | |||
| racethminorities | 0.021 | 0.021 | 0.002 | ||
| (-0.006, 0.048) | (-0.005, 0.048) | (-0.025, 0.029) | |||
| agex(29,39] | -0.103*** | -0.106*** | |||
| (-0.146, -0.060) | (-0.149, -0.063) | ||||
| agex(39,49] | -0.155*** | -0.162*** | |||
| (-0.198, -0.112) | (-0.205, -0.119) | ||||
| agex(49,59] | -0.112*** | -0.118*** | |||
| (-0.156, -0.067) | (-0.163, -0.073) | ||||
| agex(59,76] | 0.497*** | 0.492*** | |||
| (0.439, 0.555) | (0.434, 0.550) | ||||
| birthnot in the US | 0.103*** | ||||
| (0.073, 0.133) | |||||
| Constant | 0.170*** | 0.220*** | 0.198*** | 0.248*** | 0.246*** |
| (0.150, 0.190) | (0.197, 0.244) | (0.173, 0.223) | (0.206, 0.289) | (0.204, 0.287) | |
| N | 33,055 | 33,055 | 33,055 | 33,055 | 33,055 |
| R2 | 0.018 | 0.020 | 0.021 | 0.043 | 0.044 |
| Adjusted R2 | 0.017 | 0.020 | 0.021 | 0.043 | 0.044 |
| Residual Std. Error | 0.991 (df = 33052) | 0.990 (df = 33049) | 0.989 (df = 33047) | 0.978 (df = 33043) | 0.978 (df = 33042) |
| F Statistic | 294.658*** (df = 2; 33052) | 133.175*** (df = 5; 33049) | 103.166*** (df = 7; 33047) | 135.166*** (df = 11; 33043) | 127.803*** (df = 12; 33042) |
| p < .05; p < .01; p < .001 | |||||