Title: | International Assessment Data Manager |
---|---|
Description: | Provides tools for importing, merging, and analysing data from international assessment studies (TIMSS, PIRLS, PISA, ICILS, and PIAAC). |
Authors: | Daniel Caro <[email protected]>, Przemyslaw Biecek <[email protected]> |
Maintainer: | Daniel Caro <[email protected]> |
License: | GPL-2 |
Version: | 2.9 |
Built: | 2024-08-15 04:22:41 UTC |
Source: | https://github.com/eldafani/intsvy |
Provides tools for importing, merging, and analysing data from international assessment studies (TIMSS, PIRLS, PISA, and PIAAC and others)
Package: | intsvy |
Type: | Package |
Version: | 2.9 |
Date: | 2024-01-16 |
License: | GPL-2 |
intsvy allows useRs to work with international assessment data (e.g., TIMSS, PIRLS, PISA, ICILS, and PIAAC). Data and merge functions print variable labels and the name of participating countries in international assessments as well as import data directly into R for the variables in student, parent, school, and teacher instruments and countries selected by the useR. Analysis functions, including mean statistics, standard deviations, regression estimates, correlation coefficients, and frequency tables, calculate point estimates and standard errors that take into account the complex sample design (i.e., replicate weights) and rotated test forms (i.e., plausible achievement values).
Daniel Caro <[email protected]>, Przemyslaw Biecek <[email protected]>
PISA, PIAAC, PIRLS, and TIMSS Technical Reports
Each config file describes detailed study meta-data. Such meta data defined names of columns with weights, type of weighting, number of plausible values and other study parameters. Most of intsvy functions require such config objects.
pisa_conf
pisa_conf
A list with three components - input, variables and parameters.
intsvy.ben.pv calculates the percentage of students performing at or above the cut-off points (scores) given by the useR. The default are the benchmarks established by official reports.
intsvy.ben.pv(pvnames, by, cutoff, data, atlevel=FALSE, export = FALSE, name = "output", folder = getwd(), config)
intsvy.ben.pv(pvnames, by, cutoff, data, atlevel=FALSE, export = FALSE, name = "output", folder = getwd(), config)
pvnames |
The names of columns corresponding to the achievement plausible scores, for example, paste0("PV",1:10,"MATH") for PISA |
cutoff |
The cut-off points for the assessment benchmarks (e.g., cutoff= c(357.77, 420.07, 482.38, 544.68, 606.99, 669.30)). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
atlevel |
A logical value. If TRUE, percentages at each level are calculated. Otherwise (FALSE), percentages at or above levels are reported. |
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. |
pirls.ben.pv returns a data frame with the percentage of students at or above the benchmark and the corresponding standard error.
timss.ben.pv, pirls.ben.pv, pisa.ben.pv
## Not run: pisa.ben.pv(pvlabel= paste0("PV",1:10,"MATH") for PISA, by="CNT", data=pisa, atlevel = TRUE) intsvy.ben.pv(pvnames= paste0("PV",1:10,"MATH") for PISA by="CNT", data=pisa, atlevel= TRUE, config=pisa_conf) piaac.ben.pv(pvlabel= paste0("PVLIT", 1:10), by="CNTRYID", data=piaac) intsvy.ben.pv(pvnames= paste0("PVLIT", 1:10), by="CNTRYID", data=piaac, config=piaac_conf) timss.ben.pv(pvlabel= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss4) intsvy.ben.pv(pvnames= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss4, config=timss4_conf) ## End(Not run)
## Not run: pisa.ben.pv(pvlabel= paste0("PV",1:10,"MATH") for PISA, by="CNT", data=pisa, atlevel = TRUE) intsvy.ben.pv(pvnames= paste0("PV",1:10,"MATH") for PISA by="CNT", data=pisa, atlevel= TRUE, config=pisa_conf) piaac.ben.pv(pvlabel= paste0("PVLIT", 1:10), by="CNTRYID", data=piaac) intsvy.ben.pv(pvnames= paste0("PVLIT", 1:10), by="CNTRYID", data=piaac, config=piaac_conf) timss.ben.pv(pvlabel= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss4) intsvy.ben.pv(pvnames= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss4, config=timss4_conf) ## End(Not run)
intsvy.config set non standard parameters for intsvy functions. It allso allo to apply intsvy functions to new studies that are similar to PIRLS, TIMSS, PISA, PIAAC, ICILS.
intsvy.config(variables.pvlabelpref, variables.pvlabelsuff, variables.weight, variables.jackknifeZone, variables.jackknifeRep, parameters.cutoffs, parameters.cutoffs2, parameters.percentiles, parameters.weights, parameters.PVreps, parameters.varpv1, input.type, input.prefixes, input.student, input.student_colnames1, input.student_colnames2, input.student_pattern, input.homeinput, input.home_colnames, input.school, input.school_colnames, input.teacher, input.teacher_colnames, input.student_ids, input.school_ids, input.type_part, input.cnt_part, base.config = pirls_conf)
intsvy.config(variables.pvlabelpref, variables.pvlabelsuff, variables.weight, variables.jackknifeZone, variables.jackknifeRep, parameters.cutoffs, parameters.cutoffs2, parameters.percentiles, parameters.weights, parameters.PVreps, parameters.varpv1, input.type, input.prefixes, input.student, input.student_colnames1, input.student_colnames2, input.student_pattern, input.homeinput, input.home_colnames, input.school, input.school_colnames, input.teacher, input.teacher_colnames, input.student_ids, input.school_ids, input.type_part, input.cnt_part, base.config = pirls_conf)
parameters.weights |
Weighting scheme. It may be "JK" for studies like PIRLS, ICLS, TIMSS, or "BRR" for studies like PISA or "mixed_piaac" for studies with mixed design like PIAAC. |
parameters.cutoffs2 , parameters.cutoffs
|
Cut offs for plausible values, either for benchmar or for logistic regression. |
parameters.percentiles , parameters.PVreps
|
Other parameters for weighting schemes, like number of PVs. |
parameters.varpv1 |
Logical value, TRUE if only 1 plausible value for within variance estimation. |
variables.pvlabelpref , variables.pvlabelsuff , variables.weight , variables.jackknifeZone , variables.jackknifeRep
|
Names of variables that are used for jack-knife replicates. |
input.type , input.prefixes , input.student , input.student_colnames1 , input.student_colnames2 , input.student_pattern , input.homeinput , input.home_colnames , input.school , input.school_colnames , input.teacher , input.teacher_colnames , input.student_ids , input.school_ids , input.type_part , input.cnt_part
|
Parameters to correctly read data from files downloaded from iea.nl website. |
base.config |
Base config structure, either pirls_conf, pisa_conf, piaac_conf, timss4_conf, timss8_conf, icils_conf. |
intsvy.config returns new object with parameters. It is a list with three components - input, variables and parameters.
## Not run: icils_conf <- intsvy.config(input.student_pattern = "^PV[0-5]CIL$" , parameters.cutoffs2 = 550, intsvy:::pirls_conf) icils_conf ## End(Not run)
## Not run: icils_conf <- intsvy.config(input.student_pattern = "^PV[0-5]CIL$" , parameters.cutoffs2 = 550, intsvy:::pirls_conf) icils_conf ## End(Not run)
intsvy.log performs logistic regression analysis for an observed depedent variable (NOT for plausible values)
intsvy.log(y, x, by, data, export = FALSE, name = "output", folder = getwd(), config)
intsvy.log(y, x, by, data, export = FALSE, name = "output", folder = getwd(), config)
y |
Label for dependent variable |
x |
Data labels of independent variables (e.g., x = c("ASDHEHLA", "ITSEX") ). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.log prints a data frame with coefficients, standard errors, t-values, and odds ratios. Results are stored in a list object of class "intsvy.reg".
timss.log, pirls.log, pisa.log
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
intsvy.log.pv performs logistic regression with plausible values and replicate weights.
intsvy.log.pv(pvnames, x, cutoff, by, data, export=FALSE, name= "output", folder=getwd(), config)
intsvy.log.pv(pvnames, x, cutoff, by, data, export=FALSE, name= "output", folder=getwd(), config)
pvnames |
The names of columns corresponding to the achievement plausible scores. |
x |
Data labels of independent variables. |
cutoff |
The cut-off point at which the dependent plausible values scores are dichotomised (1 is larger than the cut-off) |
by |
The label for the categorical grouping variable (i.e., by="IDCNTRYL") or variables (e.g., x= c("IDCNTRYL", "ITSEX")). |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
intsvy.log.pv returns a data frame with coefficients, standard errors, t-values, and odds ratios. If "by" is specified, results are reported in a list. Weights, e.g. "TOTWGT" for PIRLS, are defined in the config argument.
pisa.log.pv, pirls.log.pv, timss.log.pv
## Not run: intsvy.log.pv(pvnames=paste0("PV",1:10,"MATH") , cutoff= 606.99, x="ESCS", by="IDCNTRYL", data=pisa, config=pisa_conf) intsvy.log.pv(pvnames=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
## Not run: intsvy.log.pv(pvnames=paste0("PV",1:10,"MATH") , cutoff= 606.99, x="ESCS", by="IDCNTRYL", data=pisa, config=pisa_conf) intsvy.log.pv(pvnames=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
Calculates mean and standard error of observed variable (NOT one with plausible values).
intsvy.mean(variable, by, data, export = FALSE, name = "output", folder = getwd(), config)
intsvy.mean(variable, by, data, export = FALSE, name = "output", folder = getwd(), config)
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. |
intsvy.mean returns a data frame with means and standard errors.
pisa.mean, timss.mean, pirls.mean
## 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)
## 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)
The function intsvy.mean.pv uses plausible values to calculate the mean achievement score and its standard error.
intsvy.mean.pv(pvnames, by, data, export=FALSE, name= "output", folder=getwd(), config)
intsvy.mean.pv(pvnames, by, data, export=FALSE, name= "output", folder=getwd(), config)
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. |
intsvy.mean.pv returns a data frame with means and standard errors.
pisa.mean.pv, timss.mean.pv, pirls.mean.pv
## Not run: 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) ## End(Not run)
## Not run: 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) ## End(Not run)
Calculates percentiles for plausible values
intsvy.per.pv(pvnames, by, per, data, export=FALSE, name= "output", folder=getwd(), config)
intsvy.per.pv(pvnames, by, per, data, export=FALSE, name= "output", folder=getwd(), config)
pvnames |
The names of columns corresponding to the achievement plausible scores. |
per |
User-defined percentiles (e.g., per = c(5, 10, 25, 75, 90, 95)). |
by |
The label of the categorical grouping variable (e.g., by="IDCNTRYL") or variables (e.g., by=c("IDCNTRYL", "ITSEX")). |
data |
An R object, normally a data frame, containing the data from intsvy studies. |
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. |
intsvy.per.pv returns a data frame with percentiles and associated standard errors. Default weights (e.g. "TOTWGT" in TIMSS) and percentiles are specified in the config parameter.
pisa.per.pv, pirls.per.pv, timss.per.pv
## Not run: timss.per.pv(pvlabel= paste0("BSMMAT0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=timss8) intsvy.per.pv(pvnames= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss8, config=timss8_conf) pirls.per.pv(pvlabel= paste0("ASRREA0", 1:5), by="IDCNTRYL", data=pirls) intsvy.per.pv(pvnames= paste0("ASRREA0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=pirls, config=pirls_conf) pisa.per.pv(pvlabel= paste0("PV",1:10,"MATH"), per=c(10, 25, 75, 90), by="CNT", data=pisa) intsvy.per.pv(pvnames= paste0("PV",1:10,"MATH"), by="CNT", data=pisa, config=pisa_conf) ## End(Not run)
## Not run: timss.per.pv(pvlabel= paste0("BSMMAT0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=timss8) intsvy.per.pv(pvnames= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss8, config=timss8_conf) pirls.per.pv(pvlabel= paste0("ASRREA0", 1:5), by="IDCNTRYL", data=pirls) intsvy.per.pv(pvnames= paste0("ASRREA0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=pirls, config=pirls_conf) pisa.per.pv(pvlabel= paste0("PV",1:10,"MATH"), per=c(10, 25, 75, 90), by="CNT", data=pisa) intsvy.per.pv(pvnames= paste0("PV",1:10,"MATH"), by="CNT", data=pisa, config=pisa_conf) ## End(Not run)
intsvy.reg performs linear regression analysis (OLS) for an observed depedent variable (NOT for plausible values)
intsvy.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd(), config)
intsvy.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd(), config)
y |
Label for dependent variable. |
x |
Data labels of independent variables. |
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. |
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. |
intsvy.reg returns a data frame with coefficients, standard errors and t-values. If "by" is specified, results are reported in a list. If the "by" argument is set, then the returning object is of the class "intsvy.reg" with overloaded function plot().
pisa.reg, pirls.reg, timss.reg
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.reg(y="AGE_R", x="GENDER_R", by="CNTRYID", data=piaac) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.reg(y="AGE_R", x="GENDER_R", by="CNTRYID", data=piaac) ## End(Not run)
intsvy.reg.pv performs linear regression analysis (OLS) with plausible values and replicate weights.
intsvy.reg.pv(x, pvnames, by, data, std=FALSE, export = FALSE, name = "output", folder = getwd(), config)
intsvy.reg.pv(x, pvnames, by, data, std=FALSE, export = FALSE, name = "output", folder = getwd(), config)
pvnames |
The names of columns corresponding to the achievement plausible scores. |
x |
Data labels of independent variables. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
std |
A logical value. If TRUE standardised regression coefficients are calculated. |
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. |
intsvy.reg.pv prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals, replicate coefficients, variance within and between, and the regression data.frame in a list object of class "intsvy.reg".
piaac.reg.pv, pirls.reg.pv, pisa.reg.pv, timss.reg.pv
## Not run: intsvy.reg.pv(pvnames=paste0("PV",1:10,"MATH") , x="ST04Q01", by = "IDCNTRYL",data=pisa, config=pisa_conf) intsvy.reg.pv(pvnames=paste0("PVLIT", 1:10), x="GENDER_R", by = "CNTRYID", data=piaac, config=piaac_conf) intsvy.reg.pv(pvnames=paste0("BSMMAT0", 1:5), by="IDCNTRYL", x="ITSEX", data=timss8g, config=timss8_conf) intsvy.reg.pv(pvnames=paste0("ASRREA0", 1:5), by="IDCNTRYL", x="ITSEX", data=pirls, config=pirls_conf) ## End(Not run)
## Not run: intsvy.reg.pv(pvnames=paste0("PV",1:10,"MATH") , x="ST04Q01", by = "IDCNTRYL",data=pisa, config=pisa_conf) intsvy.reg.pv(pvnames=paste0("PVLIT", 1:10), x="GENDER_R", by = "CNTRYID", data=piaac, config=piaac_conf) intsvy.reg.pv(pvnames=paste0("BSMMAT0", 1:5), by="IDCNTRYL", x="ITSEX", data=timss8g, config=timss8_conf) intsvy.reg.pv(pvnames=paste0("ASRREA0", 1:5), by="IDCNTRYL", x="ITSEX", data=pirls, config=pirls_conf) ## End(Not run)
intsvy.rho produces a correlation matrix for observed variables (NOT for plausible values)
intsvy.rho(variables, by, data, export = FALSE, name = "output", folder = getwd(), config)
intsvy.rho(variables, by, data, export = FALSE, name = "output", folder = getwd(), config)
variables |
Data labels for the variables in the correlation matrix (e.g., variables=c("ASRREA01", "ASDAGE") ) |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
intsvy.rho returns a matrix including correlation and standard error values.
timss.rho, pirls.rho.pv, timss.rho.pv
## Not run: pirls.rho(variables=c("ASRREA01", "ASDAGE"), by="IDCNTRYL", data=pirls) ## End(Not run)
## Not run: pirls.rho(variables=c("ASRREA01", "ASDAGE"), by="IDCNTRYL", data=pirls) ## End(Not run)
intsvy.rho.pv calculates the correlation and standard error among two achievement variables each based on 5 plausible values or one achievement variable and an observed variable (i.e., with observed scores rather than plausible values).
intsvy.rho.pv(variable, pvnames, by, data, export=FALSE, name= "output", folder=getwd(), config)
intsvy.rho.pv(variable, pvnames, by, data, export=FALSE, name= "output", folder=getwd(), config)
variable |
A data label for the observed variable |
pvnames |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data. |
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. |
intsvy.rho returns a matrix including correlation and standard error values.
timss.rho, pirls.rho.pv, timss.rho.pv
## Not run: timss.rho.pv(variable="BSDGEDUP", pvlabel=paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss) ## End(Not run)
## Not run: timss.rho.pv(variable="BSDGEDUP", pvlabel=paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss) ## End(Not run)
intsvy.select.merge selects and merges data from different international assessment studies. It was developed and it is particularly handy for importing IEA data since original files are organised by instrument, country, grade, etc., in a large number of files. Achievement and weight variabels (all of them) are selected by default.
intsvy.select.merge(folder = getwd(), countries, student = c(), home, school, teacher, config)
intsvy.select.merge(folder = getwd(), countries, student = c(), home, school, teacher, config)
folder |
Directory path where the data are located. The data could be organised within folders but duplicated files should be avoided. |
countries |
The selected countries, supplied with the abbreviation (e.g., countries=c("AUT", "BGR") or codes (countries=c(40, 100)). If no countries are selected, all are selected. |
student |
The data labels for the selected student variables. |
home |
The data labels for the selected home background variables. |
school |
The data labels for the selected school variables. |
teacher |
The data labels for the selected teacher data. |
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. |
intsvy.select.merge returns a data frame with the selected data from study defined in config file.
timssg4.select.merge, timssg8.select.merge, pisa.select.merge
## Not run: pirls <- intsvy.select.merge(folder= getwd(), countries= c("AUS", "AUT", "AZE", "BFR"), student= c("ITSEX", "ASDAGE", "ASBGSMR"), home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"), school= c("ACDGDAS", "ACDGCMP", "ACDG03"), config = pirls_conf) pirls <- intsvy.select.merge(folder= getwd(), countries= c(36, 40, 31, 957), student= c("ITSEX", "ASDAGE", "ASBGSMR"), home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"), school= c("ACDGDAS", "ACDGCMP", "ACDG03"), config = pirls_conf) timss8g <- intsvy.select.merge(folder= getwd(), countries=c("AUS", "BHR", "ARM", "CHL"), student =c("BSDGEDUP", "ITSEX", "BSDAGE", "BSBGSLM", "BSDGSLM"), school=c("BCBGDAS", "BCDG03"), config = timss8_conf) icils <- intsvy.select.merge(folder= getwd(), countries=c("AUS", "POL", "SVK"), student =c("S_SEX", "S_TLANG", "S_MISEI"), school =c("IP1G02J", "IP1G03A"), config = icils_conf) pisa <- pisa.select.merge(folder= getwd(), school.file="INT_SCQ12_DEC03.sav", student.file="INT_STU12_DEC03.sav", student= c("ST01Q01", "ST04Q01", "ESCS", "PARED"), school = c("CLSIZE", "TCSHORT"), countries = c("HKG", "USA", "SWE", "POL", "PER")) ## End(Not run)
## Not run: pirls <- intsvy.select.merge(folder= getwd(), countries= c("AUS", "AUT", "AZE", "BFR"), student= c("ITSEX", "ASDAGE", "ASBGSMR"), home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"), school= c("ACDGDAS", "ACDGCMP", "ACDG03"), config = pirls_conf) pirls <- intsvy.select.merge(folder= getwd(), countries= c(36, 40, 31, 957), student= c("ITSEX", "ASDAGE", "ASBGSMR"), home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"), school= c("ACDGDAS", "ACDGCMP", "ACDG03"), config = pirls_conf) timss8g <- intsvy.select.merge(folder= getwd(), countries=c("AUS", "BHR", "ARM", "CHL"), student =c("BSDGEDUP", "ITSEX", "BSDAGE", "BSBGSLM", "BSDGSLM"), school=c("BCBGDAS", "BCDG03"), config = timss8_conf) icils <- intsvy.select.merge(folder= getwd(), countries=c("AUS", "POL", "SVK"), student =c("S_SEX", "S_TLANG", "S_MISEI"), school =c("IP1G02J", "IP1G03A"), config = icils_conf) pisa <- pisa.select.merge(folder= getwd(), school.file="INT_SCQ12_DEC03.sav", student.file="INT_STU12_DEC03.sav", student= c("ST01Q01", "ST04Q01", "ESCS", "PARED"), school = c("CLSIZE", "TCSHORT"), countries = c("HKG", "USA", "SWE", "POL", "PER")) ## End(Not run)
intsvy.table produces a frequency table for a categorical variable printing percentages and standard errors.
intsvy.table(variable, by, data, config)
intsvy.table(variable, by, data, config)
variable |
The data label with the variable to be analysed. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
intsvy.table returns a data frame with percentages and standard errors.
timss.table, pirls.table
## Not run: intsvy.table(variable="ASDGSLM", by="IDCNTRYL", data=timss4, config = intsvy:::timss_conf) intsvy.table(variable="ST08Q01", by="CNT", data=pisa, config=pisa_conf) ## End(Not run)
## Not run: intsvy.table(variable="ASDGSLM", by="IDCNTRYL", data=timss4, config = intsvy:::timss_conf) intsvy.table(variable="ST08Q01", by="CNT", data=pisa, config=pisa_conf) ## End(Not run)
intsvy.var.labels
prints and saves variable labels and names of participating countries in a text file. The function is called by timssg4.var.label
, timssg8.var.label
, pirls.var.label
and pisa.var.label
.
intsvy.var.label(folder = getwd(), name = "Variable labels", output = getwd(), config)
intsvy.var.label(folder = getwd(), name = "Variable labels", output = getwd(), config)
folder |
Directory path where the data files are located. The data could be organized within folders but duplicated files should be avoided. It is assumed that data is in 'sav' files. For TIMSS, PIRLS and ICILS studies the data can be downloaded from |
name |
Name of the output file. |
output |
Folder where the output 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. |
intsvy.var.label
returns a list with variable labels for the student, home, school, and teacher data (if applied).
timssg4.var.label, timssg8.var.label, pirls.var.label, pisa.var.label
## Not run: intsvy.var.label(folder= getwd(), config = pirls_conf) intsvy.var.label(folder= getwd(), config = timss8_conf) intsvy.var.label(folder= getwd(), config = icils_conf) intsvy.var.label(folder= getwd(), config = piaac_conf) ## End(Not run)
## Not run: intsvy.var.label(folder= getwd(), config = pirls_conf) intsvy.var.label(folder= getwd(), config = timss8_conf) intsvy.var.label(folder= getwd(), config = icils_conf) intsvy.var.label(folder= getwd(), config = piaac_conf) ## End(Not run)
Calculates percentage of population at each proficiency level defined by PIAAC. Or at proficiency levels provided by the user.
piaac.ben.pv(pvlabel, by, data, cutoff, atlevel, export=FALSE, name= "output", folder=getwd())
piaac.ben.pv(pvlabel, by, data, cutoff, atlevel, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="CNTRYID"), but could be any other categorical variable. |
cutoff |
The cut-off points for the assessment benchmarks (e.g., cutoff= c(357.77, 420.07, 482.38, 544.68, 606.99, 669.30)). |
data |
An R object, normally a data frame, containing the data from PIAAC. |
atlevel |
A logical value. If TRUE, percentages at each level are calculated. Otherwise (FALSE), percentages at or above levels are reported. |
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. |
piaac.ben.pv returns a data frame with the percentage of students at each proficiency level and its corresponding standard error.
The total weight, "TOTWGT" and the cut-off points or benchmarks are defined in the config object.
timss.ben.pv, pirls.ben.pv, pisa.ben.pv
## Not run: #Table A2.5 #Percentage of adults scoring at each proficiency level in numeracy piaac.ben.pv(pvlabel= paste0("PVNUM", 1:10), by="CNTRYID", data=piaac) #Table A2.1 #Percentage of adults scoring at each proficiency level in literacy piaac.ben.pv(pvlabel= paste0("PVLIT", 1:10), by="CNTRYID", data=piaac) ## End(Not run)
## Not run: #Table A2.5 #Percentage of adults scoring at each proficiency level in numeracy piaac.ben.pv(pvlabel= paste0("PVNUM", 1:10), by="CNTRYID", data=piaac) #Table A2.1 #Percentage of adults scoring at each proficiency level in literacy piaac.ben.pv(pvlabel= paste0("PVLIT", 1:10), by="CNTRYID", data=piaac) ## End(Not run)
Calculates the mean of an observed variable (NOT one with plausible values) and its standard error.
piaac.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
piaac.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
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. |
piaac.mean returns a data frame with means and standard errors.
pisa.mean, timss.mean, pirls.mean
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.mean(variable="AGE_R", by="CNTRYID", data=piaac) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.mean(variable="AGE_R", by="CNTRYID", data=piaac) ## End(Not run)
piaac.mean.pv uses ten plausible values to calculate the mean achievement score and its standard error
piaac.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
piaac.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
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. |
piaac.mean.pv returns a data frame with the mean values and standard errors.
pisa.mean.pv, timss.mean.pv, pirls.mean.pv
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.mean.pv(pvlabel = paste0("PVLIT", 1:10), by = "CNTRYID", data = piaac) piaac.mean.pv(pvlabel = paste0("PVNUM", 1:10), by=c("CNTRYID", "GENDER_R"), data=piaac) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.mean.pv(pvlabel = paste0("PVLIT", 1:10), by = "CNTRYID", data = piaac) piaac.mean.pv(pvlabel = paste0("PVNUM", 1:10), by=c("CNTRYID", "GENDER_R"), data=piaac) ## End(Not run)
piaac.reg performs linear regression analysis (OLS) for an observed depedent variable (NOT for plausible values)
piaac.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
piaac.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
y |
Label for dependent variable. |
x |
Data labels of independent variables. |
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. |
piaac.reg returns a data frame with coefficients, standard errors and t-values. If "by" is specified, results are reported in a list. If the "by" argument is set, then the returning object is of the class "intsvy.reg" with overloaded function plot().
pisa.reg, pirls.reg, timss.reg
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.reg(y="AGE_R", x="GENDER_R", by="CNTRYID", data=piaac) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.reg(y="AGE_R", x="GENDER_R", by="CNTRYID", data=piaac) ## End(Not run)
piaac.reg.pv performs linear regression analysis (OLS) with plausible values and replicate weights.
piaac.reg.pv(x, pvlabel, by, data, export = FALSE, name = "output", std=FALSE, folder = getwd())
piaac.reg.pv(x, pvlabel, by, data, export = FALSE, name = "output", std=FALSE, folder = getwd())
x |
Data labels of independent variables. |
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
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. |
std |
A logical value. If TRUE standardised regression coefficients are calculated. |
folder |
The folder where the exported file is located. |
piaac.reg.pv returns a data frame with coefficients, standard errors and t-values. If "by" is specified, results are reported in a list. If the "by" argument is set, then the returning object is of the class "intsvy.reg" with overloaded function plot().
pisa.reg.pv, timss.reg.pv, pirls.reg.pv
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.reg.pv(pvlabel=paste0("PVLIT", 1:10), x="GENDER_R", by = "CNTRYID", data=piaac) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.reg.pv(pvlabel=paste0("PVLIT", 1:10), x="GENDER_R", by = "CNTRYID", data=piaac) ## End(Not run)
piaac.table produces a frequency table for a categorical variable printing percentages and standard errors.
piaac.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
piaac.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The data label with the variable to be analysed. |
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. |
piaac.table returns a data frame with percentages and standard errors.
pisa.table, timss.table, pirls.table
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.table(variable="I_Q06A", by="CNTRYID", data=piaac) piaac.table(variable="GENDER_R", by="CNTRYID", data=piaac) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data piaac.table(variable="I_Q06A", by="CNTRYID", data=piaac) piaac.table(variable="GENDER_R", by="CNTRYID", data=piaac) ## End(Not run)
pirls.ben.pv calculates the percentage of students performing at or above the cut-off points (scores) given by the useR. The default are the benchmarks established by PIRLS/TIMSS.
pirls.ben.pv(pvlabel, by, cutoff, data, atlevel=FALSE, export = FALSE, name = "output", folder = getwd())
pirls.ben.pv(pvlabel, by, cutoff, data, atlevel=FALSE, export = FALSE, name = "output", folder = getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
cutoff |
The cut-off points for the assessment benchmarks (e.g., cutoff = c(400, 475, 550, 625). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
atlevel |
A logical value. If TRUE, percentages at each level are calculated. Otherwise (FALSE), percentages at or above levels are reported. |
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. |
pirls.ben.pv returns a data frame with the percentage of students at or above the benchmark and the corresponding standard error.
The total weight, "TOTWGT" and the cut-off points or benchmarks are defined in the config object.
timss.ben.pv, pisa.ben.pv
## Not run: pirls.ben.pv(pvlabel= paste0("ASRREA0", 1:5), by="IDCNTRYL", data=pirls) ## End(Not run)
## Not run: pirls.ben.pv(pvlabel= paste0("ASRREA0", 1:5), by="IDCNTRYL", data=pirls) ## End(Not run)
pirls.log performs logistic regression analysis for an observed depedent variable (NOT for plausible values)
pirls.log(y, x, by, data, export = FALSE, name = "output", folder = getwd())
pirls.log(y, x, by, data, export = FALSE, name = "output", folder = getwd())
y |
Label for dependent variable |
x |
Data labels of independent variables (e.g., x = c("ASDHEHLA", "ITSEX") ). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.log prints a data frame with coefficients, standard errors, t-values, and odds ratios. Results are stored in a list object of class "intsvy.reg".
timss.log, pisa.log
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
pirls.log.pv performs logistic regression with plausible values and replicate weights.
pirls.log.pv(pvlabel, x, cutoff, by, data, export=FALSE, name= "output", folder=getwd())
pirls.log.pv(pvlabel, x, cutoff, by, data, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
x |
Data labels of independent variables. |
cutoff |
The cut-off point at which the dependent plausible values scores are dichotomised (1 is larger than the cut-off) |
by |
The label for the categorical grouping variable (i.e., by="IDCNTRYL") or variables (e.g., x= c("IDCNTRYL", "ITSEX")). |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.log.pv returns a data frame with coefficients, standard errors, t-values, and odds ratios. If "by" is specified, results are reported in a list.
pisa.log.pv, timss.log.pv
## Not run: timss.log.pv(pvlabel="paste0("BSMMAT0", 1:5), cutoff= 550, x=c("ITSEX", "BSBGSLM"), by="IDCNTRYL", data=timss8g) intsvy.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
## Not run: timss.log.pv(pvlabel="paste0("BSMMAT0", 1:5), cutoff= 550, x=c("ITSEX", "BSBGSLM"), by="IDCNTRYL", data=timss8g) intsvy.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
Calculates the mean of an observed variable (NOT one with plausible values) and its standard error.
pirls.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
pirls.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The label corresponding to the observed variable, for example, "ASDAGE", for the age of the student. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.mean returns a data frame with means and standard errors.
timss.mean, pisa.mean
## Not run: pirls.mean(variable='ASBHELA', by= 'IDCNTRYL', data=pirls) ## End(Not run)
## Not run: pirls.mean(variable='ASBHELA', by= 'IDCNTRYL', data=pirls) ## End(Not run)
pirls.mean.pv uses five plausible values to calculate the mean achievement score and its standard error
pirls.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pirls.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores, for example, paste0("ASRREA0", 1:5). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), 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. |
pirls.mean.pv returns a data frame with the mean values and standard errors.
timss.mean.pv, pisa.mean.pv
## Not run: pirls.mean.pv(pvlabel= paste0("ASRREA0", 1:5), by= "IDCNTRYL", data=pirls) pirls.mean.pv(pvlabel= paste0("ASRREA0", 1:5), by= c("IDCNTRYL", "ITSEX"), data=pirls) ## End(Not run)
## Not run: pirls.mean.pv(pvlabel= paste0("ASRREA0", 1:5), by= "IDCNTRYL", data=pirls) pirls.mean.pv(pvlabel= paste0("ASRREA0", 1:5), by= c("IDCNTRYL", "ITSEX"), data=pirls) ## End(Not run)
Calculates percentiles for plausible values
pirls.per.pv(pvlabel, by, per, data, export=FALSE, name= "output", folder=getwd())
pirls.per.pv(pvlabel, by, per, data, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
per |
User-defined percentiles (e.g., per = c(5, 10, 25, 75, 90, 95)). |
by |
The label of the categorical grouping variable (e.g., by="IDCNTRYL") or variables (e.g., by=c("IDCNTRYL", "ITSEX")). |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.per.pv returns a data frame with percentiles and associated standard errors. Default weights (e.g. "TOTWGT" in TIMSS) and percentiles are specified in the config parameter.
pisa.per.pv, timss.per.pv
## Not run: pirls.per.pv(pvlabel=paste0("ASRREA0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=pirls) ## End(Not run)
## Not run: pirls.per.pv(pvlabel=paste0("ASRREA0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=pirls) ## End(Not run)
pirls.reg performs linear regression analysis (OLS) for an observed depedent variable (NOT for plausible values)
pirls.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
pirls.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
y |
Label for dependent variable |
x |
Data labels of independent variables (e.g., x = c("ASDHEHLA", "ITSEX") ). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.reg prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals and replicate coefficients in a list object of class "intsvy.reg".
timss.reg
## Not run: # Recode ASBGBOOK table(as.numeric(pirls$ASBGBOOK), pirls$ASBGBOOK) pirls$BOOK[as.numeric(pirls$ASBGBOOK)==1] <- 5 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==2] <- 18 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==3] <- 63 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==4] <- 151 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==5] <- 251 table(pirls$BOOK) pirls.reg(y= "BOOK", x= "ITSEX", by="IDCNTRYL", data=pirls) ## End(Not run)
## Not run: # Recode ASBGBOOK table(as.numeric(pirls$ASBGBOOK), pirls$ASBGBOOK) pirls$BOOK[as.numeric(pirls$ASBGBOOK)==1] <- 5 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==2] <- 18 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==3] <- 63 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==4] <- 151 pirls$BOOK[as.numeric(pirls$ASBGBOOK)==5] <- 251 table(pirls$BOOK) pirls.reg(y= "BOOK", x= "ITSEX", by="IDCNTRYL", data=pirls) ## End(Not run)
pirls.reg.pv performs linear regression analysis (OLS) with plausible values and replicate weights.
pirls.reg.pv(x, pvlabel, by, data, std=FALSE, export = FALSE, name = "output", folder = getwd())
pirls.reg.pv(x, pvlabel, by, data, std=FALSE, export = FALSE, name = "output", folder = getwd())
x |
Data labels of independent variables (e.g., x = c("ASDHEHLA", "ITSEX") ). |
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
std |
A logical value. If TRUE standardised regression coefficients are calculated. |
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. |
pirls.reg.pv prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals, replicate coefficients, variance within and between, and the regression data.frame in a list object of class "intsvy.reg".
timss.reg.pv, pisa.reg.pv
## Not run: pirls$SEX[pirls$ITSEX=="BOY"]=1 pirls$SEX[pirls$ITSEX=="GIRL"]=0 pirls.reg.pv(pvlabel= paste0("ASRREA0", 1:5), by="IDCNTRYL", x="SEX", data=pirls) ## End(Not run)
## Not run: pirls$SEX[pirls$ITSEX=="BOY"]=1 pirls$SEX[pirls$ITSEX=="GIRL"]=0 pirls.reg.pv(pvlabel= paste0("ASRREA0", 1:5), by="IDCNTRYL", x="SEX", data=pirls) ## End(Not run)
pirls.rho produces a correlation matrix for observed variables (NOT for plausible values)
pirls.rho(variables, by, data, export = FALSE, name = "output", folder = getwd())
pirls.rho(variables, by, data, export = FALSE, name = "output", folder = getwd())
variables |
Data labels for the variables in the correlation matrix (e.g., variables=c("ASRREA01", "ASDAGE") ) |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.rho returns a matrix including correlation and standard error values.
timss.rho, pirls.rho.pv, timss.rho.pv
## Not run: pirls.rho(variables=c("ASRREA01", "ASDAGE"), by="IDCNTRYL", data=pirls) ## End(Not run)
## Not run: pirls.rho(variables=c("ASRREA01", "ASDAGE"), by="IDCNTRYL", data=pirls) ## End(Not run)
pirls.rho.pv calculates the correlation and standard error among two achievement variables each based on 5 plausible values or one achievement variable and an observed variable (i.e., with observed scores rather than plausible values).
pirls.rho.pv(variable, pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pirls.rho.pv(variable, pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
variable |
A data label for the observed variable (e.g., variable="ASDAGE") |
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.rho.pv returns a matrix with correlations and standard errors.
timss.rho.pv, pirls.rho, timss.rho
## Not run: pirls.rho.pv(variable="BSDGEDUP", pvlabel=paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss) ## End(Not run)
## Not run: pirls.rho.pv(variable="BSDGEDUP", pvlabel=paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss) ## End(Not run)
pirls.select.merge selects and merges data from PIRLS. Achievement and weight variabels (all of them) are selected by default.
pirls.select.merge(folder = getwd(), countries, student = c(), home, school, teacher)
pirls.select.merge(folder = getwd(), countries, student = c(), home, school, teacher)
folder |
Directory path where the data are located. The data could be organized within folders but it should not be duplicated. |
countries |
The selected countries, supplied with the abbreviation (e.g., countries=c("AUT", "BGR") or codes (countries=c(40, 100)). If no countries are selected, all are selected. |
student |
The data labels for the selected student variables. |
home |
The data labels for the selected home background variables. |
school |
The data labels for the selected school variables. |
teacher |
The data labels for the selected teacher data. |
pirls.select.merge returns a data frame with the selected data from PIRLS.
timssg4.select.merge, timssg8.select.merge, pisa.select.merge
## Not run: pirls <- pirls.select.merge(folder= getwd(), countries= c(36, 40, 31, 957), student= c("ITSEX", "ASDAGE", "ASBGSMR"), home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"), school= c("ACDGDAS", "ACDGCMP", "ACDG03")) ## End(Not run)
## Not run: pirls <- pirls.select.merge(folder= getwd(), countries= c(36, 40, 31, 957), student= c("ITSEX", "ASDAGE", "ASBGSMR"), home= c("ASDHEDUP", "ASDHOCCP", "ASDHELA", "ASBHELA"), school= c("ACDGDAS", "ACDGCMP", "ACDG03")) ## End(Not run)
pirls.table produces a frequency table for a categorical variable printing percentages and standard errors. Information about weight is extracted from intsvy:::pirls_conf
.
pirls.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
pirls.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The data label with the variable to be analysed. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
pirls.table returns a data frame with percentages and standard errors.
timss.table, pisa.table
## Not run: pirls.table(variable="ASDHELA", by="IDCNTRYL", data=pirls) ## End(Not run)
## Not run: pirls.table(variable="ASDHELA", by="IDCNTRYL", data=pirls) ## End(Not run)
pirls.var.labels prints and saves variable labels and names of participating countries in a text file
pirls.var.label(folder = getwd(), name = "Variable labels", output = getwd())
pirls.var.label(folder = getwd(), name = "Variable labels", output = getwd())
folder |
Directory path where the PIRLS data are located. The data could be organized within folders but it should not be duplicated. |
name |
Name of output file. |
output |
Folder where output file is located. |
pirls.var.label returns a list with variable labels for the student, home, school, and teacher data.
timssg4.var.label, timssg8.var.label, pisa.var.label
## Not run: pirls.var.label(folder= getwd()) ## End(Not run)
## Not run: pirls.var.label(folder= getwd()) ## End(Not run)
Calculates percentage of students at each proficiency level defined by PISA. Or at proficiency levels provided by the useR.
pisa.ben.pv(pvlabel, by, cutoff, data, atlevel=FALSE, export=FALSE, name= "output", folder=getwd())
pisa.ben.pv(pvlabel, by, cutoff, data, atlevel=FALSE, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
cutoff |
The cut-off points for the assessment benchmarks (e.g., cutoff= c(357.77, 420.07, 482.38, 544.68, 606.99, 669.30)). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
atlevel |
A logical value. If TRUE, percentages at each level are calculated. Otherwise (FALSE), percentages at or above levels are reported. |
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. |
pisa.ben.pv returns a data frame with the percentage of students at each proficiency level and its corresponding standard error.
The total weight, "TOTWGT" and the cut-off points or benchmarks are defined in the config object.
timss.ben.pv, pirls.ben.pv
## Not run: pisa.ben.pv(pvlabel= paste0("PV",1:10,"MATH"), by="IDCNTRYL", atlevel=TRUE, data=pisa) ## End(Not run)
## Not run: pisa.ben.pv(pvlabel= paste0("PV",1:10,"MATH"), by="IDCNTRYL", atlevel=TRUE, data=pisa) ## End(Not run)
pisa.log performs logistic regression analysis (OLS) for an observed depedent variable (NOT for plausible values)
pisa.log(y, x, by, data, export=FALSE, name= "output", folder=getwd())
pisa.log(y, x, by, data, export=FALSE, name= "output", folder=getwd())
y |
Label for dependent variable. |
x |
Data labels of independent variables. |
by |
The label for the grouping variable, usually the countries (i.e., by="CNT"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.log prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores replicate estimates and other regression output in a list object of class "intsvy.reg".
pirls.log, timss.log
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
pisa.log.pv performs logistic regression with plausible values and replicate weights.
pisa.log.pv(pvlabel, x, by, cutoff, data, export=FALSE, name= "output", folder=getwd())
pisa.log.pv(pvlabel, x, by, cutoff, data, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
x |
Data labels of independent variables. |
cutoff |
The cut-off point at which the dependent plausible values scores are dichotomised (1 is larger than the cut-off) |
by |
The label for the categorical grouping variable (i.e., by="IDCNTRYL") or variables (e.g., x= c("IDCNTRYL", "ST79Q03")). |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.log.pv returns a data frame with coefficients, standard errors, t-values, and odds ratios. If "by" is specified, results are reported in a list.
timss.log.pv, pirls.log.pv
## Not run: timss.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x=c("ITSEX", "BSBGSLM"), by="IDCNTRYL", data=timss8g) intsvy.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
## Not run: timss.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x=c("ITSEX", "BSBGSLM"), by="IDCNTRYL", data=timss8g) intsvy.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
Calculates the mean of an observed variable (NOT one with plausible values) and its standard error.
pisa.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
pisa.mean(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The label corresponding to the observed variable, for example, ""ESCS"", for the student SES. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.mean returns a data frame with means and standard errors.
timss.mean, pirls.mean, piaac.mean
## Not run: pisa.mean(variable="ESCS", by="IDCNTRYL", data=pisa) pisa.mean(variable="PARED", by="IDCNTRYL", data=pisa) pisa.mean(variable="BELONG", by="IDCNTRYL", data=pisa) pisa.mean(variable="BELONG", by=c("IDCNTRYL", "ST04Q01"), data=pisa) ## End(Not run)
## Not run: pisa.mean(variable="ESCS", by="IDCNTRYL", data=pisa) pisa.mean(variable="PARED", by="IDCNTRYL", data=pisa) pisa.mean(variable="BELONG", by="IDCNTRYL", data=pisa) pisa.mean(variable="BELONG", by=c("IDCNTRYL", "ST04Q01"), data=pisa) ## End(Not run)
pisa.mean.pv uses five plausible values to calculate the mean achievement score and its standard error
pisa.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pisa.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores, for example, paste0("PV",1:10,"MATH"). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), 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. |
pisa.mean.pv returns a data frame with the mean values and standard errors.
timss.mean.pv, pirls.mean.pv, piaac.mean.pv
## Not run: pisa.mean.pv(pvlabel = paste0("PV",1:10,"MATH"), by = "IDCNTRYL", data = pisa) pisa.mean.pv(pvlabel = paste0("PV",1:10,"MATH"), by = c("IDCNTRYL", "ST04Q01"), data = pisa) pisa.mean.pv(pvlabel = "paste0("PV",1:10,"MATH"), by = "IDCNTRYL", data = pisa) ## End(Not run)
## Not run: pisa.mean.pv(pvlabel = paste0("PV",1:10,"MATH"), by = "IDCNTRYL", data = pisa) pisa.mean.pv(pvlabel = paste0("PV",1:10,"MATH"), by = c("IDCNTRYL", "ST04Q01"), data = pisa) pisa.mean.pv(pvlabel = "paste0("PV",1:10,"MATH"), by = "IDCNTRYL", data = pisa) ## End(Not run)
Calculates percentiles for plausible values.
pisa.per.pv(pvlabel, by, per, data, export=FALSE, name= "output", folder=getwd())
pisa.per.pv(pvlabel, by, per, data, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
per |
User-defined percentiles (e.g., per = c(5, 10, 25, 75, 90, 95)). |
by |
The label of the categorical grouping variable (e.g., by="IDCNTRYL") or variables (e.g., by=c("IDCNTRYL", "ST79Q03")). |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.per.pv returns a data frame with percentiles and associated standard errors. Default weights (e.g. "TOTWGT" in TIMSS) and percentiles are specified in the config parameter.
timss.per.pv, pirls.per.pv
## Not run: pisa.per.pv(pvlabel=paste0("PV",1:10,"MATH"), per=c(10, 25, 75, 90), by="IDCNTRYL", data=pisa) ## End(Not run)
## Not run: pisa.per.pv(pvlabel=paste0("PV",1:10,"MATH"), per=c(10, 25, 75, 90), by="IDCNTRYL", data=pisa) ## End(Not run)
pisa.reg performs linear regression analysis (OLS) for an observed depedent variable (NOT for plausible values)
pisa.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
pisa.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
y |
Label for dependent variable. |
x |
Data labels of independent variables. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.reg prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals and replicate coefficients in a list object of class "intsvy.reg".
pirls.reg, timss.reg, piaac.reg
## Not run: pisa.reg(y="BELONG", x="ST04Q01", by="IDCNTRYL", data=pisa) ## End(Not run)
## Not run: pisa.reg(y="BELONG", x="ST04Q01", by="IDCNTRYL", data=pisa) ## End(Not run)
pisa.reg.pv performs linear regression analysis (OLS) with plausible values and replicate weights.
pisa.reg.pv(x, pvlabel, by, data, export = FALSE, name = "output", folder = getwd(), std=FALSE)
pisa.reg.pv(x, pvlabel, by, data, export = FALSE, name = "output", folder = getwd(), std=FALSE)
x |
Data labels of independent variables. |
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
std |
A logical value. If TRUE standardised regression coefficients are calculated. |
pisa.reg.pv prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals, replicate coefficients, variance within and between, and the regression data.frame in a list object of class "intsvy.reg".
timss.reg.pv, pirls.reg.pv, piaac.reg.pv
## Not run: pisa.reg.pv(pvlabel=paste0("PV",1:10,"MATH"), x="ST04Q01", by = "IDCNTRYL", data=pisa) ## End(Not run)
## Not run: pisa.reg.pv(pvlabel=paste0("PV",1:10,"MATH"), x="ST04Q01", by = "IDCNTRYL", data=pisa) ## End(Not run)
pisa.rho produces a correlation matrix for observed variables (NOT for plausible values)
pisa.rho(variables, by, data, export=FALSE, name= "output", folder=getwd())
pisa.rho(variables, by, data, export=FALSE, name= "output", folder=getwd())
variables |
Data labels for the variables in the correlation matrix (e.g., variables=c("TCHBEHTD", "TCHBEHSO")) |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.rho returns a matrix including correlation and standard error values.
timss.rho, pirls.rho, pirls.rho.pv, timss.rho.pv
## Not run: pisa.rho(variables=c("COGACT", "TCHBEHTD", "TCHBEHSO", "CLSMAN" ), by="IDCNTRYL", data=pisa) ## End(Not run)
## Not run: pisa.rho(variables=c("COGACT", "TCHBEHTD", "TCHBEHSO", "CLSMAN" ), by="IDCNTRYL", data=pisa) ## End(Not run)
pisa.select.merge selects and merges data from PISA. Achievement and weight variables (all of them) are selected by default.
pisa.select.merge(folder=getwd(), student.file, parent.file=c(), school.file=c(), countries, student=c(), parent, school)
pisa.select.merge(folder=getwd(), student.file, parent.file=c(), school.file=c(), countries, student=c(), parent, school)
folder |
Directory path where the PISA data are located, if all the data are located in the same folder. |
student.file |
Student file name if 'folder' is provided, otherwise full path name of student dataset (required argument). |
parent.file |
Parent file name if 'folder' is provided, otherwise full path name of parent dataset. |
school.file |
School file name if 'folder' is provided, otherwise full path name of school dataset. |
countries |
The selected countries, supplied with the abbreviation (e.g., countries=c("DEU", "NOR") or codes. If no countries are selected, all are selected. |
student |
The data labels for the selected student variables. |
parent |
The data labels for the selected parental variables. |
school |
The data labels for the selected school variables. |
pisa.select.merge returns a data frame with the selected data from PISA.
timssg4.select.merge, timssg8.select.merge, pirls.select.merge
## Not run: pisa <- pisa.select.merge(folder=getwd(), school.file="INT_SCQ12_DEC03.sav", student.file="INT_STU12_DEC03.sav", parent.file="INT_PAQ12_DEC03.sav", student= c("IMMIG", "ESCS", "ST04Q01", "ST61Q04", "ST62Q01", "ST08Q01"), parent = c("PARINVOL", "PARSUPP"), school = c("STRATIO", "SCHAUTON", "CLSIZE"), countries = c("HKG", "USA", "SWE", "POL", "PER")) ## End(Not run)
## Not run: pisa <- pisa.select.merge(folder=getwd(), school.file="INT_SCQ12_DEC03.sav", student.file="INT_STU12_DEC03.sav", parent.file="INT_PAQ12_DEC03.sav", student= c("IMMIG", "ESCS", "ST04Q01", "ST61Q04", "ST62Q01", "ST08Q01"), parent = c("PARINVOL", "PARSUPP"), school = c("STRATIO", "SCHAUTON", "CLSIZE"), countries = c("HKG", "USA", "SWE", "POL", "PER")) ## End(Not run)
pisa.table produces a frequency table for a categorical variable printing percentages and standard errors.
pisa.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
pisa.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The data label with the variable to be analysed. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PISA. |
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. |
pisa.table returns a data frame with percentages and standard errors.
timss.table, pirls.table
## Not run: pisa.table(variable="ST01Q01", by="IDCNTRYL", data=pisa) pisa.table(variable="ST08Q01", by="IDCNTRYL", data=pisa) ## End(Not run)
## Not run: pisa.table(variable="ST01Q01", by="IDCNTRYL", data=pisa) pisa.table(variable="ST08Q01", by="IDCNTRYL", data=pisa) ## End(Not run)
pisa.var.labels prints and saves variable labels and names of participating countries in a text file
pisa.var.label(folder=getwd(), student.file, parent.file=c(), school.file=c(), name="Variable labels", output=getwd())
pisa.var.label(folder=getwd(), student.file, parent.file=c(), school.file=c(), name="Variable labels", output=getwd())
folder |
Directory path where the PISA data are located, if all the data are located in the same folder. |
student.file |
Student file name if 'folder' is provided, otherwise full path name of student dataset (required argument). |
parent.file |
Parent file name if 'folder' is provided, otherwise full path name of parent dataset. |
school.file |
School file name if 'folder' is provided, otherwise full path name of school dataset. |
name |
Name of output file. |
output |
Folder where output file is located. |
pisa.var.label returns a list with variable labels for the student, parent, and school data.
timssg4.var.label, timssg8.var.label, pirls.var.label
## Not run: pisa.var.label(folder=getwd(), school.file="INT_SCQ12_DEC03.sav", student.file="INT_STU12_DEC03.sav", parent.file="INT_PAQ12_DEC03.sav") ## End(Not run)
## Not run: pisa.var.label(folder=getwd(), school.file="INT_SCQ12_DEC03.sav", student.file="INT_STU12_DEC03.sav", parent.file="INT_PAQ12_DEC03.sav") ## End(Not run)
Functions pisa.mean, pisa.mean.pv, piaac.mean, piaac.mean.pv produce object of the class intsvy.mean. The function plot.intsvy.mean presents these means graphically.
## S3 method for class 'intsvy.mean' plot(x, se = TRUE, sort = FALSE, ...)
## S3 method for class 'intsvy.mean' plot(x, se = TRUE, sort = FALSE, ...)
x |
An object of the class intsvy.mean returned by pisa.mean, pisa.mean.pv, piaac.mean or piaac.mean.pv functions. |
se |
If TRUE add whiskers for standard errors. |
sort |
If TRUE groups are sorted along averages. |
... |
Not used. Required for cran-check. |
Returns object of ggplot class with dotplot. Works for one way, two-way and three-way effects.
plot.intsvy.table, plot.intsvy.reg
## Not run: # Country averages head(pmeansNC <- piaac.mean.pv(pvlabel="NUM", by="CNTRYID", data=piaac, export=FALSE)) # plotting country average NUM performance plot(pmeansNC) + ggtitle("Country performance in NUM") # without se bars, not good idea plot(pmeansNC, se=FALSE) # sorted, thats better plot(pmeansNC, sort=TRUE) # Country averages for different age groups head(pmeansNCA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "AGEG10LFS"), data=piaac, export=FALSE)) # # plotting country average within # age groups NUM performance plot(pmeansNCA, sort=TRUE) # Country averages for different age and gender groups (changed order) head(pmeansNCGA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "GENDER_R", "AGEG10LFS"), data=piaac, export=FALSE)) # # plotting country average within # age and gender groups NUM performance plot(na.omit(pmeansNCGA), sort=TRUE) ## End(Not run)
## Not run: # Country averages head(pmeansNC <- piaac.mean.pv(pvlabel="NUM", by="CNTRYID", data=piaac, export=FALSE)) # plotting country average NUM performance plot(pmeansNC) + ggtitle("Country performance in NUM") # without se bars, not good idea plot(pmeansNC, se=FALSE) # sorted, thats better plot(pmeansNC, sort=TRUE) # Country averages for different age groups head(pmeansNCA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "AGEG10LFS"), data=piaac, export=FALSE)) # # plotting country average within # age groups NUM performance plot(pmeansNCA, sort=TRUE) # Country averages for different age and gender groups (changed order) head(pmeansNCGA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "GENDER_R", "AGEG10LFS"), data=piaac, export=FALSE)) # # plotting country average within # age and gender groups NUM performance plot(na.omit(pmeansNCGA), sort=TRUE) ## End(Not run)
Functions pisa.reg, pisa.reg.pv, piaac.reg and piaac.reg.pv produce object of the class intsvy.reg. The function plot.intsvy.reg presents this list of regression models graphically.
## S3 method for class 'intsvy.reg' plot(x, ..., vars, se = TRUE, sort = FALSE)
## S3 method for class 'intsvy.reg' plot(x, ..., vars, se = TRUE, sort = FALSE)
x |
An object of the class intsvy.reg returned by pisa.reg, pisa.reg.pv, piaac.reg and piaac.reg.pv functions. |
... |
Other arguments |
vars |
Variable labels of coefficients to be plotted. If none selected all coefficients are plotted including the R-squared |
se |
If TRUE add whiskers for standard errors. |
sort |
If TRUE groups are sorted in alphabetical order. |
Returns object of ggplot class with barplot. As with other ggplot objects the plus sign "+" can be used outside this function to modify graph parameters of the returning ggplot object. Works for one way, two-way and three-way contingency tables.
plot.intsvy.table, plot.intsvy.mean
## Not run: # Independent variables x.vars <- c("ESCS", "COGACT", "TCHBEHTD", "TCHBEHSO") # Model estimation my.mod <- pisa.reg.pv(pvlabel="MATH", x=x.vars, by="IDCNTRYL", data=pisa12) # Plot plot(gen.mod, vars = c("COGACT", "TCHBEHTD", "TCHBEHSO"), sort=TRUE) ## End(Not run)
## Not run: # Independent variables x.vars <- c("ESCS", "COGACT", "TCHBEHTD", "TCHBEHSO") # Model estimation my.mod <- pisa.reg.pv(pvlabel="MATH", x=x.vars, by="IDCNTRYL", data=pisa12) # Plot plot(gen.mod, vars = c("COGACT", "TCHBEHTD", "TCHBEHSO"), sort=TRUE) ## End(Not run)
Functions pisa.table and piaac.table produce object of the class intsvy.table. The function plot.intsvy.table presents this table graphically.
## S3 method for class 'intsvy.table' plot(x, se=FALSE, stacked=FALSE, centered = FALSE, midpoint = NA, ...)
## S3 method for class 'intsvy.table' plot(x, se=FALSE, stacked=FALSE, centered = FALSE, midpoint = NA, ...)
x |
An object of the class intsvy.table returned by pisa.table or piaac.table functions. |
se |
If TRUE add whiskers for standard errors (only for stacked=FALSE). |
stacked |
If TRUE plot bars stacked one over another. |
centered |
If TRUE then bars will be centered around |
midpoint |
A single number, which specifies the segment around which bars are centered. By default it's the middle segment calculated as |
... |
Not used. Required for cran-check. |
Returns object of ggplot class with barplot. Works for one way, two-way and three-way contingency tables.
plot.intsvy.mean, plot.intsvy.reg
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data # age distribution in whole dataset (ptable <- piaac.table(variable="AGEG10LFS", data=piaac)) # age distribution in whole dataset plot(ptable) plot(ptable, centered=TRUE) # age distribution within countries head(ptableC <- piaac.table(variable="AGEG10LFS", by="CNTRYID", data=piaac)) # age distribution within countries plot(ptableC, stacked=TRUE) plot(na.omit(ptableC), centered=TRUE) # age distribution within countries and gender segments head(ptableCA <- piaac.table(variable="AGEG10LFS", by=c("CNTRYID", "GENDER_R"), data=piaac)) # age distribution within countries and gender segments plot(na.omit(ptableCA), stacked=TRUE) plot(na.omit(ptableCA), centered=TRUE) ## End(Not run)
## Not run: # install pbiecek/PIAAC package from github to have access to piaac data # age distribution in whole dataset (ptable <- piaac.table(variable="AGEG10LFS", data=piaac)) # age distribution in whole dataset plot(ptable) plot(ptable, centered=TRUE) # age distribution within countries head(ptableC <- piaac.table(variable="AGEG10LFS", by="CNTRYID", data=piaac)) # age distribution within countries plot(ptableC, stacked=TRUE) plot(na.omit(ptableC), centered=TRUE) # age distribution within countries and gender segments head(ptableCA <- piaac.table(variable="AGEG10LFS", by=c("CNTRYID", "GENDER_R"), data=piaac)) # age distribution within countries and gender segments plot(na.omit(ptableCA), stacked=TRUE) plot(na.omit(ptableCA), centered=TRUE) ## End(Not run)
timss.ben.pv calculates the percentage of students performing at or above the cut-off points (scores) given by the useR. The default are the benchmarks established by PIRLS/TIMSS
timss.ben.pv(pvlabel, by, cutoff, data, atlevel=FALSE, export = FALSE, name = "output", folder = getwd())
timss.ben.pv(pvlabel, by, cutoff, data, atlevel=FALSE, export = FALSE, name = "output", folder = getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
cutoff |
The cut-off points for the assessment benchmarks (e.g., cutoff = c(400, 475, 550, 625)). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
atlevel |
A logical value. If TRUE, percentages at each level are calculated. Otherwise (FALSE), percentages at or above levels are reported. |
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. |
timss.ben.pv returns a data frame with the percentage of students at or above the benchmark and the corresponding standard error.
The total weight, "TOTWGT" and the cut-off points or benchmarks are defined in the config object.
pirls.ben.pv, pisa.ben.pv
## Not run: timss.ben.pv(pvlabel= paste0("BSMMAT0", 1:5), by="IDCNTRYL", cutoff = c(400, 475, 550, 625), data=timss8g) timss.ben.pv(pvlabel= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss4g) ## End(Not run)
## Not run: timss.ben.pv(pvlabel= paste0("BSMMAT0", 1:5), by="IDCNTRYL", cutoff = c(400, 475, 550, 625), data=timss8g) timss.ben.pv(pvlabel= paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss4g) ## End(Not run)
timss.log performs logistic regression analysis for an observed depedent variable (NOT for plausible values)
timss.log(y, x, by, data, export = FALSE, name = "output", folder = getwd())
timss.log(y, x, by, data, export = FALSE, name = "output", folder = getwd())
y |
Label for dependent variable |
x |
Data labels of independent variables (e.g., x = c("ASDHEHLA", "ITSEX") ). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from PIRLS. |
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. |
timss.log prints a data frame with coefficients, standard errors, t-values, and odds ratios. Results are stored in a list object of class "intsvy.reg".
pirls.log, pisa.log
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
## Not run: pisa$SKIP[!(pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None")] <- 1 pisa$SKIP[pisa$ST09Q01 =="None" & pisa$ST115Q01 == "None"] <- 0 pisa$LATE[!pisa$ST08Q01=="None"] <- 1 pisa$LATE[pisa$ST08Q01=="None"] <- 0 pisa.log(y="SKIP", x="LATE", by="IDCNTRYL", data = pisa) ## End(Not run)
timss.log.pv performs logistic regression with plausible values and replicate weights.
timss.log.pv(pvlabel, x, by, cutoff, data, export=FALSE, name= "output", folder=getwd())
timss.log.pv(pvlabel, x, by, cutoff, data, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
x |
Data labels of independent variables. |
cutoff |
The cut-off point at which the dependent plausible values scores are dichotomised (1 is larger than the cut-off) |
by |
The label for the categorical grouping variable (i.e., by="IDCNTRYL") or variables (e.g., x= c("IDCNTRYL", "ITSEX")). |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.log.pv returns a data frame with coefficients, standard errors, t-values, and odds ratios. If "by" is specified, results are reported in a list.
pisa.log.pv, pirls.log.pv
## Not run: timss.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x=c("ITSEX", "BSBGSLM"), by="IDCNTRYL", data=timss8g) intsvy.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
## Not run: timss.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x=c("ITSEX", "BSBGSLM"), by="IDCNTRYL", data=timss8g) intsvy.log.pv(pvlabel=paste0("BSMMAT0", 1:5), cutoff= 550, x="ITSEX", by="IDCNTRYL", data=timss8g, config=timss8_conf) ## End(Not run)
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(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The label corresponding to the observed variable, for example, "ASDAGE", for the age of the student. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.mean returns a data frame with means and standard errors.
pirls.mean, pisa.mean
## Not run: timss.mean(variable='ASBGSLM', by='IDCNTRYL', data=timss4g) timss.mean(variable='BSBGSLM', by='IDCNTRYL', data=timss8g) ## End(Not run)
## Not run: timss.mean(variable='ASBGSLM', by='IDCNTRYL', data=timss4g) timss.mean(variable='BSBGSLM', by='IDCNTRYL', data=timss8g) ## End(Not run)
timss.mean.pv uses five plausible values to calculate the mean achievement score and its standard error
timss.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
timss.mean.pv(pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores, for example, paste0("BSMMAT0", 1:5). |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), 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. |
timss.mean.pv returns a data frame with the mean values and standard errors.
pirls.mean.pv, pisa.mean.pv
## Not run: timss.mean.pv(pvlabel= paste0("BSMMAT0", 1:5), by= "IDCNTRYL", data=timss4g) timss.mean.pv(pvlabel= paste0("BSMMAT0", 1:5), by= c("IDCNTRYL", "ITSEX"), data=timss8g) ## End(Not run)
## Not run: timss.mean.pv(pvlabel= paste0("BSMMAT0", 1:5), by= "IDCNTRYL", data=timss4g) timss.mean.pv(pvlabel= paste0("BSMMAT0", 1:5), by= c("IDCNTRYL", "ITSEX"), data=timss8g) ## End(Not run)
Calculates percentiles for plausible values
timss.per.pv(pvlabel, by, per, data, export=FALSE, name= "output", folder=getwd())
timss.per.pv(pvlabel, by, per, data, export=FALSE, name= "output", folder=getwd())
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
per |
User-defined percentiles (e.g., per = c(5, 10, 25, 75, 90, 95)). |
by |
The label of the categorical grouping variable (e.g., by="IDCNTRYL") or variables (e.g., by=c("IDCNTRYL", "ITSEX")). |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.per.pv returns a data frame with percentiles and associated standard errors. Default weights (e.g. "TOTWGT" in TIMSS) and percentiles are specified in the config parameter.
pisa.per.pv, pirls.per.pv
## Not run: timss.per.pv(pvlabel=paste0("BSMMAT0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=timssg8) ## End(Not run)
## Not run: timss.per.pv(pvlabel=paste0("BSMMAT0", 1:5), per = c(5, 10, 25, 50, 75, 90, 95), by="IDCNTRYL", data=timssg8) ## End(Not run)
timss.reg performs linear regression analysis (OLS) for an observed depedent variable (NOT for plausible values)
timss.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
timss.reg(y, x, by, data, export = FALSE, name = "output", folder = getwd())
y |
Label for dependent variable. |
x |
Data labels of independent variables. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.reg prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals and replicate coefficients in a list object of class "intsvy.reg".
pirls.reg
## Not run: timss.reg(y="BSDAGE", x="ITSEX", by="IDCNTRYL", data=timss8g) ## End(Not run)
## Not run: timss.reg(y="BSDAGE", x="ITSEX", by="IDCNTRYL", data=timss8g) ## End(Not run)
timss.reg.pv performs linear regression analysis (OLS) with plausible values and replicate weights.
timss.reg.pv(x, pvlabel, by, data, std=FALSE, export = FALSE, name = "output", folder = getwd())
timss.reg.pv(x, pvlabel, by, data, std=FALSE, export = FALSE, name = "output", folder = getwd())
x |
Data labels of independent variables. |
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
std |
A logical value. If TRUE standardised regression coefficients are calculated. |
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. |
timss.reg.pv prints a data.frame with regression results (i.e., coefficients, standard errors, t-values, R-squared) and stores different regression output including residuals, replicate coefficients, variance within and between, and the regression data.frame in a list object of class "intsvy.reg".
pirls.reg.pv, pisa.reg.pv
## Not run: timss8g$SEX[timss8g$ITSEX=="BOY"]=1 timss8g$SEX[timss8g$ITSEX=="GIRL"]=0 timss.reg.pv(pvlabel= paste0("BSMMAT0", 1:5), by=c("IDCNTRYL"), x="SEX", data=timss8g) ## End(Not run)
## Not run: timss8g$SEX[timss8g$ITSEX=="BOY"]=1 timss8g$SEX[timss8g$ITSEX=="GIRL"]=0 timss.reg.pv(pvlabel= paste0("BSMMAT0", 1:5), by=c("IDCNTRYL"), x="SEX", data=timss8g) ## End(Not run)
timss.rho produces a correlations matrix for observed variables (NOT for plausible values)
timss.rho(variables, by, data, export = FALSE, name = "output", folder = getwd())
timss.rho(variables, by, data, export = FALSE, name = "output", folder = getwd())
variables |
Data labels for the variables in the correlation matrix. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.rho returns a matrix including correlation and standard error values.
pirls.rho, pirls.rho.pv, timss.rho.pv
## Not run: timss.rho(variables=c("BSMMAT01", "BSDGEDUP"), data=timss) ## End(Not run)
## Not run: timss.rho(variables=c("BSMMAT01", "BSDGEDUP"), data=timss) ## End(Not run)
timss.rho.pv calculates the correlation and standard error among two achievement variables each based on 5 plausible values or one achievement variable and an observed variable (i.e., with observed scores rather than plausible values).
timss.rho.pv(variable, pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
timss.rho.pv(variable, pvlabel, by, data, export = FALSE, name = "output", folder = getwd())
variable |
A data label for the observed variable |
pvlabel |
The names of columns corresponding to the achievement plausible scores. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.rho.pv returns a matrix with correlations and standard errors.
pirls.rho.pv, pirls.rho, timss.rho
## Not run: timss.rho.pv(variable="BSDGEDUP", pvlabel=paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss) ## End(Not run)
## Not run: timss.rho.pv(variable="BSDGEDUP", pvlabel=paste0("BSMMAT0", 1:5), by="IDCNTRYL", data=timss) ## End(Not run)
timss.table produces a frequency table for a categorical variable printing percentages and standard errors. Information about weight is extracted from intsvy:::pirls_conf
.
timss.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
timss.table(variable, by, data, export = FALSE, name = "output", folder = getwd())
variable |
The data label with the variable to be analysed. |
by |
The label for the grouping variable, usually the countries (i.e., by="IDCNTRYL"), but could be any other categorical variable. |
data |
An R object, normally a data frame, containing the data from TIMSS. |
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. |
timss.table returns a data frame with percentages and standard errors.
pirls.table, pisa.table
## Not run: timss.table(variable="ASDGSLM", by="IDCNTRYL", data=timss4g) timss.table(variable="BSDGSLM", by="IDCNTRYL", data=timss8g) ## End(Not run)
## Not run: timss.table(variable="ASDGSLM", by="IDCNTRYL", data=timss4g) timss.table(variable="BSDGSLM", by="IDCNTRYL", data=timss8g) ## End(Not run)
timssg4.select.merge selects and merges data from TIMSS G4. Achievement and weight variables (all of them) are selected by default.
timssg4.select.merge(folder = getwd(), countries, student = c(), home, school, teacher)
timssg4.select.merge(folder = getwd(), countries, student = c(), home, school, teacher)
folder |
Directory path where the data are located. The data could be organized within folders but it should not be duplicated. |
countries |
The selected countries, supplied with the abbreviation (e.g., countries=c("AUT", "BGR") or codes (countries=c(40, 100)). If no countries are selected, all are selected. |
student |
The data labels for the selected student variables. |
home |
The data labels for the selected home background variables. |
school |
The data labels for the selected school variables. |
teacher |
The data labels for the selected teacher variables. |
timssg4.select.merge returns a data frame with the selected data from TIMSS G4.
timssg8.select.merge, pirls.select.merge, pisa.select.merge
## Not run: timss4g <- timssg4.select.merge(folder=getwd(), countries=c("AUS", "BHR", "ARM", "CHL"), student =c("ITSEX", "ASDAGE", "ASBGSLM", "ASDGSLM"), home = c("ASDHEDUP", "ASDHENA"), school =c("ACDG03", "ACDGENS")) ## End(Not run)
## Not run: timss4g <- timssg4.select.merge(folder=getwd(), countries=c("AUS", "BHR", "ARM", "CHL"), student =c("ITSEX", "ASDAGE", "ASBGSLM", "ASDGSLM"), home = c("ASDHEDUP", "ASDHENA"), school =c("ACDG03", "ACDGENS")) ## End(Not run)
timssg4.var.labels prints and saves variable labels and names of participating countries in a text file
timssg4.var.label(folder = getwd(), name = "Variable labels", output = getwd())
timssg4.var.label(folder = getwd(), name = "Variable labels", output = getwd())
folder |
Directory path where the TIMSS G4 data are located. The data could be organized within folders but it should not be duplicated. |
name |
Name of output file. |
output |
Folder where output file is located. |
timssg4.var.label returns a list with variable labels for the student, home, school, and teacher data.
timssg8.var.label, pirls.var.label, pisa.var.label
## Not run: timssg4.var.label(folder= getwd()) ## End(Not run)
## Not run: timssg4.var.label(folder= getwd()) ## End(Not run)
timssg8.select.merge selects and merges data from TIMSS G8.
timssg8.select.merge(folder = getwd(), countries, student = c(), school, math.teacher, science.teacher)
timssg8.select.merge(folder = getwd(), countries, student = c(), school, math.teacher, science.teacher)
folder |
Directory path where the data are located. The data could be organized within folders but it should not be duplicated. |
countries |
The selected countries, supplied with the abbreviation (e.g., countries=c("AUT", "BGR") or codes (countries=c(40, 100)). If no countries are selected, all are selected. |
student |
The data labels for the selected student variables. |
school |
The data labels for the selected school variables. |
math.teacher |
The data labels for the selected math teacher variables. |
science.teacher |
The data labels for the selected science teacher variables. |
timssg8.select.merge returns a data frame with the selected data from TIMSS G8.
timssg4.select.merge, pirls.select.merge, pisa.select.merge
## Not run: timss8g <- timssg8.select.merge(folder=getwd(), countries=c("AUS", "BHR", "ARM", "CHL"), student =c("BSDGEDUP", "ITSEX", "BSDAGE", "BSBGSLM", "BSDGSLM"), school =c("BCBGDAS", "BCDG03")) ## End(Not run)
## Not run: timss8g <- timssg8.select.merge(folder=getwd(), countries=c("AUS", "BHR", "ARM", "CHL"), student =c("BSDGEDUP", "ITSEX", "BSDAGE", "BSBGSLM", "BSDGSLM"), school =c("BCBGDAS", "BCDG03")) ## End(Not run)
timssg8.var.labels prints and saves variable labels and names of participating countries in a text file
timssg8.var.label(folder = getwd(), name = "Variable labels", output = getwd())
timssg8.var.label(folder = getwd(), name = "Variable labels", output = getwd())
folder |
Directory path where the TIMSS G8 data are located. The data could be organized within folders but it should not be duplicated. |
name |
Name of output file. |
output |
Folder where output file is located. |
timssg8.var.label returns a list with variable labels for the student, home, school, and teacher data.
timssg4.var.label, pirls.var.label, pisa.var.label
## Not run: timssg8.var.label(folder= getwd()) ## End(Not run)
## Not run: timssg8.var.label(folder= getwd()) ## End(Not run)