I do not know that package so cannot help with that but the dataset did
not come through. This mailing list is quite restrictive in what sorts
of attachment it allows so I suggest trying something like a .csv file
or a .txt file.
Michael
On 28/09/2021 10:37, ??? wrote:> I am using your excellent R package eRM to solve a questionaire survey
data. I meet a strange issue when using RSM function. This RSM runs well using
sample data.
>
> There is a test data like this:
>
> 'data.frame': 1669 obs. of 7 variables:
>
> $ X1: num 2 2 3 3 2 3 4 4 3 2 ...
>
> $ X2: num 4 3 3 2 3 4 4 4 3 3 ...
>
> $ X3: num 4 3 3 4 3 3 4 4 3 0 ...
>
> $ X4: num 2 3 2 4 1 2 3 3 3 1 ...
>
> $ X5: num 4 4 3 3 3 4 4 4 3 3 ...
>
> $ X6: num 4 4 4 3 3 4 4 4 3 3 ...
>
> $ X7: num 4 2 3 4 3 3 4 4 3 3 ...
>
>
>
> ###
>
> RSM(test)
>
> Warning in sqrt(diag(solve(parest$hessian))) : NaNs produced
>
> Warning in sqrt(diag(lres$W %*% solve(parest$hessian) %*% t(lres$W))) :
>
> NaNs produced
>
>
>
> Results of RSM estimation:
>
>
>
> Call: RSM(X = test)
>
>
>
> Conditional log-likelihood: 13768080
>
> Number of iterations: 5
>
> Number of parameters: 9
>
>
>
> Item (Category) Difficulty Parameters (eta):
>
> X2 X3 X4 X5 X6 X7
Cat 2 Cat 3 Cat 4
>
> Estimate -700.9534 -456.4338 901.4649 -1322.033 -1256.828 -673.2412
-231.5791 -3979.953 1911.748203
>
> Std.Err NaN NaN NaN NaN NaN NaN
NaN NaN 1.036215
>
>
>
> ###
>
> So, I use a shortened data, run like this:
>
> RSM(test[1:283,])
>
> Results of RSM estimation:
>
>
>
> Call: RSM(X = test[1:283, ])
>
>
>
> Conditional log-likelihood: -1015.388
>
> Number of iterations: 29
>
> Number of parameters: 9
>
>
>
> Item (Category) Difficulty Parameters (eta):
>
> X2 X3 X4 X5 X6 X7
Cat 2 Cat 3 Cat 4
>
> Estimate -0.0739008 0.05655997 1.2203061 -1.1212188 -0.7547957 -0.0378593
1.2020940 3.2657449 8.501760
>
> Std.Err 0.1018267 0.10026033 0.1003035 0.1195827 0.1125677 0.1013739
0.4387487 0.8161754 1.226057
>
>
>
> ###
>
> However, when I add one record, from 283 to 284,
>
> RSM(test[1:284,])
>
> Warning in sqrt(diag(solve(parest$hessian))) : NaNs produced
>
> Warning in sqrt(diag(lres$W %*% solve(parest$hessian) %*% t(lres$W))) :
>
> NaNs produced
>
>
>
> Results of RSM estimation:
>
>
>
> Call: RSM(X = test[1:284, ])
>
>
>
> Conditional log-likelihood: 3369344
>
> Number of iterations: 6
>
> Number of parameters: 9
>
>
>
> Item (Category) Difficulty Parameters (eta):
>
> X2 X3 X4 X5 X6 X7
Cat 2 Cat 3 Cat 4
>
> Estimate -670.9137 -554.6215 527.789997 -1359.721 -1127.137 -626.1859
-126.7199 -4753.367 2134.408482
>
> Std.Err 2152.9823 1679.2875 2.377241 NaN NaN 3394.5180
562.6800 11045.935 3.526018
>
>
>
> I can?t find any special values in the data list
>
> X1 X2 X3 X4 X5 X6 X7
>
> 270 4 4 4 3 4 4 4
> 271 3 3 3 1 3 3 3
> 272 4 3 4 1 4 4 4
>
> 273 3 3 3 3 3 3 3
>
> 274 3 3 4 4 3 3 4
>
> 275 3 3 3 3 3 3 3
>
> 276 1 3 3 3 3 3 3
>
> 277 3 3 3 2 4 4 4
>
> 278 2 3 2 1 3 3 3
>
> 279 3 3 3 2 3 3 3
>
> 280 3 3 2 2 3 3 3
>
> 281 3 4 4 3 4 3 3
>
> 282 2 2 2 2 2 2 2
>
> 283 3 4 3 1 4 3 3
>
> 284 2 4 2 1 4 3 2
>
> 285 3 3 3 3 3 3 3
>
> 286 4 4 3 4 4 4 4
>
> 287 4 3 4 0 3 4 4
>
> 288 0 3 4 0 4 4 1
>
> 289 4 4 4 4 4 4 4
>
> 290 3 3 3 3 3 3 2
>
>
>
> If I input many different numbers of data, the results often become
strange.
>
> The data is appended at the letter. No na values in all data.
>
>
>
> Great thanks
>
>
>
> #### all data is in the appended file
>
>
>
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Michael
http://www.dewey.myzen.co.uk/home.html