-
Notifications
You must be signed in to change notification settings - Fork 1
/
GSS.R
36 lines (36 loc) · 1.33 KB
/
GSS.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#' @name GSS
#' @docType data
#'
#' @title 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")
#'
#' @format A data frame with 44091 rows and 3 columns.
#' \describe{
#' \item{parentdeg}{A factor representing parents' attained level of education
#' (highest "degree" obtained), recording
#' the higher of mother's and father's education, with levels \code{"l.t.highschool"},
#' \code{"highschool"}, \code{"college"}, and \code{"graduate"}.}
#' \item{degree}{The respondent's level of education, a factor with the same levels
#' as \code{parentdeg}.}
#' \item{year}{The year of the survey, between \code{1972} and
#' \code{2016}.}
#' }
#'
#' @source General Social Survey, NORC, The University of Chicago
#' https://www.norc.org/Research/Projects/Pages/general-social-survey.aspx.
#'
#' @seealso \code{\link{nestedLogit}}.
#'
#' @examples
#' 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)
"GSS"