intsvy.mean: Calculates mean of variable

View source: R/intsvy.mean.R

intsvy.meanR Documentation

Calculates mean of variable

Description

Calculates mean and standard error of observed variable (NOT one with plausible values).

Usage

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

Arguments

variable

The label corresponding to the observed variable, for example, "AGE_R" for age of respondent.

by

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

data

An R object, normally a data frame, containing the data from PIAAC.

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.

Value

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

See Also

pisa.mean, timss.mean, pirls.mean

Examples

## Not run: 
intsvy.mean(variable="READHOME", by="CNTRYID", data=piaac, config=piaac_conf)
intsvy.mean(variable="PARED", by="IDCNTRYL", data=pisa, config=pisa_conf)
intsvy.mean(variable="BSBGSLM", by='IDCNTRYL', data=timss8g, config=timss8_conf)
intsvy.mean(variable='ASBHELA', by= 'IDCNTRYL', data=pirls,config=pirls_conf)

## End(Not run)

intsvy documentation built on Oct. 3, 2023, 1:07 a.m.