readHSLS {EdSurvey}R Documentation

Connect to High School Longitudinal Study 2009 (HSLS:2009) Data

Description

Opens a connection to an HSLS data file and returns an edsurvey.data.frame with information about the file and data.

Usage

readHSLS(
  path = getwd(),
  filename = "hsls_16_student_v1_0.sav",
  wgtFilename = NA,
  forceReread = FALSE,
  verbose = TRUE
)

Arguments

path

a character value to the full directory path(s) to the HSLS extracted SPSS (.sav) set of data files

filename

a character value of the name of the SPSS (.sav) datafile to be read

wgtFilename

a character value of the name of the associated BRR weight SPSS (.sav) data file in the specificed path to be read. This argument is only applicable for the restricted-use student level data, which contains a separate data-file containing the weight replicate information. For data files with no balanced repeated replication (BRR) weight file associated, specify a value of NULL or NA.

forceReread

a logic value to force a rereading of all processed data. The default value of FALSE speeds up the readHSLS function by using existing read-in data already processed.

verbose

a logical value set to TRUE for verbose output that indicates progress

Details

Reads in the unzipped files downloaded from the HSLS longitudinal dataset.

Value

an edsurvey.data.frame for the HSLS longitudinal dataset

Note

The SPSS (.sav) format is preferred over the fixed-width-format (.dat) ASCII file format at this time relating to value label issues identified with the ASCII layout specifications.

Author(s)

Tom Fink

See Also

readECLS_K2011, readNAEP, and getData

Examples

## Not run: 
# use function default values at working directory
hsls <- readHSLS("~/HSLS/2009")

# specify parameters with verbose output
hsls <- readHSLS(path="~/HSLS/2009", 
                 filename = "hsls_16_student_v1_0.sav", 
                 forceReread = FALSE, 
                 verbose = TRUE)

# specify parameters silent output
hsls <- readHSLS(path="~/HSLS/2009", 
                 filename = "hsls_16_student_v1_0.sav", 
                 forceReread = FALSE, 
                 verbose = FALSE)

#for restricted-use student data, replicate weights stored in separate file
hslsRUD <- readHSLS(path="~/HSLS/2009", 
                    filename = "hsls_16_student_v1_0.sav", 
                    wgtFilename = "hsls_16_student_BRR_v1_0.sav",
                    forceReread = FALSE, 
                    verbose = TRUE)

## End(Not run)

[Package EdSurvey version 4.0.7 Index]