scoreit: A Function that Computes Factor Scores According to the...

Description Usage Arguments Value Examples

View source: R/scoreit.R

Description

This function takes the df of items and executes psyscores::congeneric(). It then takes the lavaan model and applies the procedure outlined by McNeish and Wolf (2020), following from Skrondal & Laake (2001)

Usage

1
scoreit(itemdf, datadf, scorerole = "NULL")

Arguments

itemdf

input data frame of the items used when executing psyscores::congeneric()

datadf

target data frame to which the computed vector of factor scores should be appended

scorerole

input character for which analytic role the factor score will play. When "predictor" is specified, regression/MAP scores with Croon (2002) correction are computed. When "outcome" is specified, Bartlett scores are computed. No default to prevent accidental specification.

Value

data frame consisting of data frame specified in datadf with the additional column of factor scores

Examples

1
dvn = dyadVarNames(dat, xvar="X", sep = ".",distinguish1 = "1", distinguish2 = "2")

jsakaluk/scripty documentation built on Dec. 31, 2021, 9:17 p.m.