R/rd-fakeTSCS.R

#' @importFrom tibble tibble
NULL

#' Fake Data for a Time-Series Cross-Section
#'
#' This is a toy (i.e. "fake") data set created by the \code{fabricatr} package.
#'  There are 100 observations for 25 hypothetical countries. The outcome \code{y}
#'  is a linear function of a baseline for each hypothetical country, plus a yearly
#'  growth trend as well as varying growth errors for each country. \code{x1} is
#'  supposed to have a linear effect of .5 on \code{y}, all things considered.
#'  \code{x2} is supposed to have a linear effect of 1 on \code{y} for each unit
#'  change in \code{x2}, all things considered.
#'
#' @format A data frame with 2500 observations on the following 8 variables.
#' \describe{
#' \item{\code{year}}{a numeric vector for the year}
#' \item{\code{country}}{a character vector for the country}
#' \item{\code{y}}{a numeric vector for the outcome.}
#' \item{\code{x1}}{a continuous variable}
#' \item{\code{x2}}{a binary variable}
#' \item{\code{base}}{a numeric vector for the baseline starting point for each country}
#' \item{\code{growth_units}}{a numeric vector for the growth units for each country}
#' \item{\code{growth_error}}{a numeric vector for the growth errors for each country}
#' }
#'
#' @details \code{x1} is generated by a normal distribution with a mean of 5 and a standard
#' deviation of 2. \code{x2} is drawn from a Bernoulli distribution with a
#' probability of .5 of observing a 1.
#'
"fakeTSCS"

Try the stevedata package in your browser

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

stevedata documentation built on Oct. 25, 2023, 5:07 p.m.