R/item.fnc.R

Defines functions `item.fnc`

`item.fnc` <-
function(data) {
    itemMeans = tapply(data$RT, data$Item, mean) 
    itemMeans = itemMeans[sort(names(itemMeans))]
    item.dat = unique(data[ , c(2, 3, 4, 5)])
    item.dat = item.dat[order(item.dat$Item), ]
    item.dat$Means = itemMeans
    item.dat.lm = stats::lm(Means ~ X + Y + Z, data = item.dat)
    return(item.dat.lm)
}

Try the languageR package in your browser

Any scripts or data that you put into this service are public.

languageR documentation built on May 2, 2019, 10:02 a.m.