Learn R Programming

rel (version 1.4.2)

sem: Standard error of measurement

Description

Calculates the standard error of measurement

Usage

sem(data = NULL, type = c("mse", "sd", "cpd"), conf.level = 0.95)

Arguments

data

A matrix with n subjects and m observations (n*m matrix).

type

The method used to compute sem with a character string specifying "sd" for the within-subject standard deviation, "mse" for the square root of the ANOVA error variance, or "cpd" for the consecutive pairwise difference.

conf.level

Confidence level of the interval.

Value

method

Analysis name

obs

Number of observations

sample

Sample size

na

missing values

est

Point estimate

lb

Lower confidence boundary

ub

Upper confidence boundary

est.cpd

sem for adjacent columns

data

analyzed data

Details

"sd" and "mse" includes complete cases only and have a confidence interval based on a t distribution. "cpd" includes all cases, derives sem from the difference between adjacent trials, and has a confidence interval based on a chi squared distribution (Hopkins 2015). "cpd" is computed both overall and separately for consecutive trials, the latter allowing one to assess whether habituation decreases sem (Hopkins 2015).

References

Nunnally, J. C., Bernstein, I. H. (1994). Psychometric theory. New York, NY: McGraw-Hill. Hopkins, W. G. (2015). Spreadsheets for Analysis of Validity and Reliability. Sportscience 19, 36-42.

Examples

Run this code
# NOT RUN {
#Sample data: 200 subjects rated their weight twice.
data <- cbind(sample(50:100,200,replace=TRUE), sample(50:100,200,replace=TRUE))

#Standard error of measurement
sem(data=data, type="mse", conf.level=0.95)
# }

Run the code above in your browser using DataLab