R/data-happy.R

#' Data related to happiness from the General Social Survey, 1972-2006.
#'
#' This data extract is taken from Hadley Wickham's \code{productplots} package.
#' The original description follows, with minor edits.
#'
#' The data is a small sample of variables related to
#' happiness from the General Social Survey (GSS). The GSS
#' is a yearly cross-sectional survey of Americans, run from
#' 1972. We combine data for 25 years to yield 51,020
#' observations, and of the over 5,000 variables, we select
#' nine related to happiness:
#'
#' @details \itemize{
#'   \item age. age in years: 18--89.
#'   \item degree. highest education: lt high school, high school, junior college, bachelor, graduate.
#'   \item finrela. relative financial status: far above, above average, average, below average, far below.
#'   \item happy. happiness: very happy, pretty happy, not too happy.
#'   \item health. health: excellent, good, fair, poor.
#'   \item marital. marital status: married, never married, divorced, widowed, separated.
#'   \item sex. sex: female, male.
#'   \item wtsall. probability weight. 0.43--6.43.
#' }
#'
#' @docType data
#' @keywords datasets
#' @name happy
#' @usage data(happy)
#' @format A data frame with 51020 rows and 10 variables
#' @references
#' Smith, Tom W., Peter V. Marsden, Michael Hout, Jibum Kim. \emph{General Social Surveys, 1972-2006}.
#'   \[machine-readable data file\]. Principal Investigator, Tom W. Smith; Co-Principal Investigators,
#'   Peter V. Marsden and Michael Hout, NORC ed.
#'   Chicago: National Opinion Research Center, producer, 2005;
#'   Storrs, CT: The Roper Center for Public Opinion Research, University of Connecticut, distributor.
#'   1 data file (57,061 logical records) and 1 codebook (3,422 pp).
NULL

Try the GGally package in your browser

Any scripts or data that you put into this service are public.

GGally documentation built on Nov. 22, 2023, 9:06 a.m.