Learn R Programming

intsvy (version 2.9)

intsvy.mean.pv: Calculates mean achievement score

Description

The function intsvy.mean.pv uses plausible values to calculate the mean achievement score and its standard error.

Usage

intsvy.mean.pv(pvnames, by, data, export=FALSE, name= "output", folder=getwd(), config)

Value

intsvy.mean.pv returns a data frame with means and standard errors.

Arguments

pvnames

The names of columns corresponding to the achievement plausible scores, for example, paste0("PV",1:10,"MATH") for PISA.

by

The label for the grouping variable, usually the countries (e.g., by="CNTRYID"), but could be any other categorical variable.

data

An R object, normally a data frame.

export

A logical value. If TRUE, the output is exported to a file in comma-separated value format (.csv) that can be opened from LibreOffice or Excel.

name

The name of the exported file.

folder

The folder where the exported file is located.

config

Object with configuration of a given study. Should contain the slot `prefixes` with prefixes of filenames with the student, home, school, and teacher data.

See Also

pisa.mean.pv, timss.mean.pv, pirls.mean.pv

Examples

Run this code
if (FALSE) {
intsvy.mean.pv(pvnames = paste0("ASRREA0", 1:5), by= "IDCNTRYL", 
    data=pirls, config=pirls_conf)

intsvy.mean.pv(pvnames = paste0("PV",1:10,"MATH"), by="CNT", data=pisa, 
    config=pisa_conf)
    
intsvy.mean.pv(pvnames = paste0("BSMMAT0", 1:5), by= "IDCNTRYL", data=timss8g, 
    config=timss8_conf)
    
intsvy.mean.pv(pvnames = paste0("PVNUM", 1:10), by="CNTRYID", data=piaac, 
    config=piaac_conf)    
}

Run the code above in your browser using DataLab