From a392ecda1958eaef2855814a4050e5d7f29c3f15 Mon Sep 17 00:00:00 2001 From: philchalmers Date: Thu, 17 Jan 2013 12:08:13 -0500 Subject: [PATCH] Makes sure design names are different from latent variables --- R/mixedmirt.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/mixedmirt.R b/R/mixedmirt.R index e79626af0..a7961e0f4 100644 --- a/R/mixedmirt.R +++ b/R/mixedmirt.R @@ -198,6 +198,8 @@ mixedmirt <- function(data, covdata = NULL, model, fixed = ~ 1, random = NULL, i stop('No fixed or random effects have been specified.') Theta <- matrix(0, nrow(data), nrow(model$x)) colnames(Theta) <- model$x[,1] + if(any(colnames(Theta) %in% colnames(covdata)) || any(colnames(Theta) %in% colnames(itemdesign))) + stop('Predictor variable names must be different from latent variable names.') fixed.identical <- FALSE if(all(itemdesign == 1)) fixed.identical <- TRUE fixed.design.list <- designMats(covdata=covdata, fixed=fixed, Thetas=Theta, nitems=ncol(data),