readCivEDICCS: Connect to ICCS and CivED Data

View source: R/readICCS.R

readCivEDICCSR Documentation

Connect to ICCS and CivED Data

Description

Opens a connection to an ICCS (2009, 2016) or CivEd (1999) data file and returns an edsurvey.data.frame with information about the file and data.

Usage

readCivEDICCS(
  path,
  countries,
  dataSet = c("student", "teacher"),
  gradeLvl = c("8", "9", "12"),
  forceReread = FALSE,
  verbose = TRUE
)

Arguments

path

a character value of the full directory to the ICCS/CivED extracted SPSS (.sav) set of data

countries

a character vector of the country/countries to include using the three-digit International Organization for Standardization (ISO) country code. A list of country codes can be found on Wikipedia at https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes or other online sources. Consult the ICCS/CivED User Guide to help determine what countries are included within a specific testing year of ICCS/CivED. To select all countries, use a wildcard value of *.

dataSet

a character value of either student or teacher to indicate which set of data is returned. The student-level and teacher-level datasets cannot both be returned at the same time, unlike other IEA datasets. Note: The CivED 1999 study also included student-to-teacher data for Grade 8. Specifying dataSet="student" and gradeLvl=8 will include both the student and teacher data in the resulting edsurvey.data.frame.

gradeLvl

a character value of the grade level to return

  • 8 = eighth grade (the default if not specified)

  • 9 = ninth grade

  • 12 = 12th grade (for CivED 1999 only)

forceReread

a logical value to force rereading of all processed data. The default value of FALSE will speed up the readCivEDICCS function by using existing read-in data already processed.

verbose

a logical value to either print or suppress status message output. The default value is TRUE.

Details

Reads in the unzipped files downloaded from the international database(s) using the IEA Study Data Repository. Data files require the SPSS data file (.sav) format using the default filenames.

When using the getData function with a CivED or ICCS study edsurvey.data.frame, the requested data variables are inspected, and it handles any necessary data merges automatically. The school data always will be returned merged to the student data, even if only school variables are requested. If a 1999 CivED Grade 8 edsurvey.data.frame with teacher data variables is requested by the getData call, it will cause teacher data to be merged. Many students can be linked to many teachers, which varies widely between countries, and not all countries contain teacher data.

Calling the dim function for a CivED 1999 Grade 8 edsurvey.data.frame will result in the row count as if the teacher dataset was merged. This row count will be considered the full data N of the edsurvey.data.frame, even if no teacher data were included in an analysis. The column count returned by dim will be the count of unique column variables across all data levels.

Value

an edsurvey.data.frame for a single specified country or an edsurvey.data.frame.list if multiple countries specified

Author(s)

Tom Fink

See Also

readNAEP, readTIMSS, getData, and downloadCivEDICCS

Examples

## Not run: 
eng <- readCivEDICCS("~/ICCS/2009/", countries = c("eng"),
                     gradeLvl = 8, dataSet = "student")
gg <- getData(getData=eng, varnames=c("famstruc", "totwgts", "civ"))
head(gg)
edsurveyTable(formula=civ ~ famstruc, data=eng)

## End(Not run)

EdSurvey documentation built on June 27, 2024, 5:10 p.m.