Learn R Programming

nestedLogit (version 0.3.2)

GSS: Data From the U.S. General Social Survey 1972-2016

Description

This data set is drawn from the U.S. General Social Survey (GSS) for years between 1972 and 2016.

Usage

data("GSS", package = "nestedLogit")

Arguments

Format

A data frame with 44091 rows and 3 columns.

parentdeg

A factor representing parents' attained level of education (highest "degree" obtained), recording the higher of mother's and father's education, with levels "l.t.highschool", "highschool", "college", and "graduate".

degree

The respondent's level of education, a factor with the same levels as parentdeg.

year

The year of the survey, between 1972 and code2016.

See Also

nestedLogit.

Examples

Run this code
round(100*with(GSS, prop.table(table(degree, parentdeg), 2)))
m.GSS <- nestedLogit(degree ~ parentdeg*year,
                     continuationLogits(c("l.t.highschool",  "highschool",
                                           "college", "graduate")),
                     data=GSS)
car::Anova(m.GSS)
summary(m.GSS)

Run the code above in your browser using DataLab