Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "datasets/berndt-cps-wages-1985/docs/types/index.d"

Index

Type aliases

Functions

Type aliases

Observation

Observation: { age: number; education: number; experience: number; gender: string; married: number; occupation: string; race: string; sector: string; south: number; union: number; wage: number }

Data for individual worker.

Type declaration

  • age: number

    Age (in years).

  • education: number

    Number of years of education.

  • experience: number

    Number of years of work experience.

  • gender: string

    Gender of the person.

  • married: number

    Marital status (0 if unmarried; 1 if married).

  • occupation: string

    Occupational category ('management', 'sales', 'clerical', 'service', 'professional', and 'other').

  • race: string

    Ethnicity/Race ('white', 'hispanic', and 'other').

  • sector: string

    Sector ('other', 'manufacturing', or 'construction').

  • south: number

    Indicator variable for southern region (1 if a person lives in the South; 0 if a person does not live in the South).

  • union: number

    Indicator variable for union membership (1 if union member; 0 if not a union member).

  • wage: number

    Log-transformed wage (in dollars per hour).

Functions

Export assignment dataset

  • Returns a random sample of 534 workers from the Current Population Survey (CPS) from 1985.

    Notes

    • This function synchronously reads data from disk for each invocation. Such behavior is intentional and so is the avoidance of require. We assume that invocations are infrequent, and we want to avoid the require cache. This means that we allow data to be garbage collected and a user is responsible for explicitly caching data.
    throws

    unable to read data

    Returns Array < Observation >

    data

    Example

    var data = dataset();
    // returns [ {...}, {...}, ... ]