fit.lavaan {ThurMod} | R Documentation |
Performs lavaan estimation of the given model.
Description
This function writes a lavaan syntax given the specifications of the Thurstonian forced choice model. Additionally it runs the code (given lavaan is installed) and returns the results.
Usage
fit.lavaan(blocks, itf, model, data = NULL, estimator = "ULSMV",
rename_list = NULL)
Arguments
blocks |
A matrix defining the blocks of the model. The number of rows must be the number of blocks, each row represents a block and contains the item numbers. The number of columns present the number of items per block. |
itf |
A vector defining the items-to-factor relation. For example 'c(1,1,1,2,2,2)' defines six items, the first three correspond to factor 1, the second three correspond to factor 2. |
model |
A descriptor for the model. Can be one of ''lmean'', ''uc'‘, '’irt'‘ or '’simple2'‘, '’simple3'‘ or '’simple5''. The Number behind the ''simple'' statement defines the Thurstone case. |
data |
A matrix or data frame including the binary indicators as columns and respondents as rows. |
estimator |
Which estimator should be used? All estimators that are available in ‘lavaan' can be used. Defaults to '’ULSMV''. |
rename_list |
A list with two vectors to rename the objects in the syntax. Vector one is the original names, vector two the new names. Defaults to 'NULL'. |
Details
The syntax currently is able to perform model analysis for the latent utility model (''simple'‘ and '’lmean''; Maydeu-Olivares & Böckenholt, 2005) the unconstrained factor model (''uc''; Maydeu-Olivares & Böckenholt, 2005) and the IRT model(''irt''; Maydeu-Olivares & Brown, 2010). Additionally, all model types can be performed with all types of forced choice designs (full, block, partially linked block, linked block). For an overview and review see Jansen and Schulze (2023a,2023b).
The standard naming procedure ixiy, for the comparison of items x and y, can be changed by specifying the 'rename_list' argument. The first vector of the schould be the vector of original names, for example ‘c(’i1i2','i1i3','i2i3','Trait1','Trait2','Trait3')' the second vector should contain the new names, for example ‘c(’A01E12','A01C13','E01C23','Agree','Extra','Consc')'.
Value
Returns a lavaan object containing the specified results, after model analysis.
References
Maydeu-Olivares, A., & Böckenholt, U. (2005). Structural equation modeling of paired-comparison and ranking data. Psychological Methods, 10(3), 285-304. doi:10.1037/1082-989X.10.3.285
Maydeu-Olivares, A., & Brown, A. (2010). Item response modeling of paired comparison and ranking data. Multivariate Behavioural Research, 45(6), 935-974. doi:10.1080/00273171.2010.531231
Jansen, M. T., & Schulze, R. (2023a). Linear factor analytic Thurstonian forced-choice models: Current status and issues. Educational and Psychological Measurement.
Jansen, M. T., & Schulze, R. (2023b, in review). The Thurstonian linked block design: Improving Thurstonian modeling for paired comparison and ranking data.
Examples
# read and save data set FC
data(FC12)
# set seed and define blocks
blocks <- matrix(c(5,2,1,4,7,6,3,8,10,12,9,11), ncol = 3)
# define the item-to-factor relation
itf <- rep(1:3,4)
# Create and run syntax
fit <- fit.lavaan(blocks, itf, 'irt', FC, estimator = 'ULSMV')