How to save data for RASCHMIX() analysis?

I am lost and I kindly ask you, dear R community, for your help:

> raschmix(TPsubmatrix, k=2, scores = "saturated")
2 : *Error in matrix(1, nrow = sum(groups$groupfirst)) : data is too long
In addition: Warning message:
In min(which(rs > 0)) : no non-missing arguments to min; returning Inf
 *Error in matrix(1, nrow = sum(groups$groupfirst)) : data is too long
 *Error in matrix(1, nrow = sum(groups$groupfirst)) : data is too long

Error in stepFlexmix(.response ~ 1, data = d, k = k, nrep = nrep, cluster = cluster,  : 
  no convergence to a suitable mixture

Does anyone has experience with raschmix() and knows how I have to save my data, so that it can be analysed?
This would be so amazing!
Thank you very much for your help, interest and effort in any case!

what is TPsubmatrix, how did you make it ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

I glanced at the documentation , I think you'd only pass a datateix along with a formula, or else you would use other functions to take the matrix and prep it to be passed to that function.
Are you following the documentation, or some written example to guide you.?

Thanks for your message!

TPsubmatrix is just the name of my datamatrix:

> str(TPsubmatrix)
 num [1:40, 1:33] 3 2 5 4 1 1 3 1 4 3 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr [1:33] "Item011" "Item012" "Item013" "Item021" ...

Thank you!

The document does contain such examples of forumulas in its section 4 empirical examples. It doesn't in the earlier but for those it passes a simulation object. - r2 <- simRaschmix(design = "rost2")

I am following this guideline and their examples.
They don't write a formula either. What is a dataeix?

THANK YOU for your interest!

Yes, I know the examples, thank you! :slight_smile:
But my problem is that I don't know how to make my data matrix look like the r2 matrix :frowning: