powered by
Calculates the mean of an observed variable (NOT one with plausible values) and its standard error.
timss.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
timss.mean returns a data frame with means and standard errors.
The label corresponding to the observed variable, for example, "ASDAGE", for the age of the student.
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable.
An R object, normally a data frame, containing the data from TIMSS.
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.
The name of the exported file.
The folder where the exported file is located.
pirls.mean, pisa.mean
if (FALSE) { timss.mean(variable='ASBGSLM', by='IDCNTRYL', data=timss4g) timss.mean(variable='BSBGSLM', by='IDCNTRYL', data=timss8g) }
Run the code above in your browser using DataLab