0

I am new to mirt models and tried to estimate a graded response model with the mirt-package in Rstudio using the mirt command:

x <- pid[,c(items.25,items.1,items.13)]

#x= dataframe with 1228 observations of 24 variables

# define bifactor model
#model syntax
mirtsyn <- paste0("G = ",paste0(colnames(x), collapse = ","),"\n",
                  "F1 = ",paste0(items.25,collapse = ","),"\n",
                  "F2 = ",paste0(items.1,collapse = ","),"\n",
                  "F3 = ",paste0(items.13,collapse = ","))

mirtmodel <- mirt.model(mirtsyn, itemnames=colnames(x))


# estimate model
fit <- mirt(x,model = mirtmodel,itemtype = "graded", SE = FALSE, method = "MHRM") 

#itemtype = graded means its using a graded response model, 
#method= MHRM (Metropolis-Hastings Robbins-Monro) means it uses stochastic methods for estimation'

I got this error message:

Error in draw.thetas(theta0 = gtheta0[[g]], pars = pars[[g]], fulldata = Data$fulldata[[g]],  : 
  MH sampler failed. Model is likely unstable or may need better starting valuesFALSE
Phil
  • 5,491
  • 3
  • 26
  • 61
C K
  • 11
  • 1
  • 1
    If you want to learn more about why your specific analysis failed, you're probably going to have to make your question reproducible. Check it out: [making R reproducible questions](https://stackoverflow.com/q/5963269). – Kat May 09 '22 at 00:08

0 Answers0