Learn R Programming

multicon (version 1.6)

item.resid: Item Level Residuals

Description

Returns the residuals of y.set after predicting the values from the corresponding columsn in x.set.

Usage

item.resid(x.set, y.set, nomiss = 0.8)

Arguments

x.set
A data.frame or matrix, with the same dimensions as y.set, of which each column is a predictor of the corresponding column in y.set.
y.set
A data.frame or matrix, with the same dimensions as x.set, of which each column is to be predicted by the correpsonding column in x.set.
nomiss
A numeric between .00 and 1.00 specifying the proportion of x-y pairs required to be complete before NA is returned instead of the regression coefficients. The default of .80 means that if more than 20 percent of the x-y pairs are incomplete an NA will be returned.

Value

A data.frame with the same dimensions as y.set, containing the residual values on each item after predicting the item scores from the values in x.set.

Details

Each column in x.set is used to predict its corresponding column in y.set and the residuals are returned.

See Also

lin.coef temp.resid Profile.reg

Examples

Run this code
data(caq)
data(RSPdata)
	#Lets predict California Adult Q-Sort scores from extraversion scores 
	#and compute the residual scores on each CAQ item.
head(caq) 
RSPdata$sEXT
dim(caq)
m.sEXT <- matrix(RSPdata$sEXT, nrow = 205, ncol = 100)
head(m.sEXT)
residuals <- item.resid(m.sEXT,caq)
head(residuals) 

Run the code above in your browser using DataLab