Repository navigation
keep theta_start, mu and sigma2 aligned with respm after dropping persons - #3
Open
kevinushey wants to merge 1 commit into
Open
kevinushey wants to merge 1 commit into
kevinushey wants to merge 1 commit into
Conversation
This was referenced Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The next Rcpp release (see RcppCore/Rcpp#1513) checks that the operands of a sugar expression, and a vector assigned into a matrix row, column or
Rangesubset, have matching lengths. Previously a longer operand was silently truncated to the length of the left-hand side or target. With that check, PP fails its CRAN checks with:For
type = "mle"and"robust",PP_4pl(),PP_gpcm()andPPall()drop persons with a full or zero score fromrespmbefore estimation, andkilldupli = TRUEdrops duplicated patterns.theta_start,muandsigma2are not subset along with it, so the C++ side receives start values for 13 persons and a response matrix for 11, andl1l2M(_, 3) = THETA - l1l2M(_, 2)fails. Old Rcpp used the first 11 start values, so after removing persons from the middle the start values were shifted relative to the remaining persons. With the default start values this only affected the starting point of the Newton-Raphson iterations; withkilldupli = TRUEand per-personmu/sigma2it paired persons with the wrong prior.Change
Subset
theta_start, andmu/sigma2when they are per-person vectors, with the same index asrespmin both places, in all three estimation functions.Testing
R CMD checkon the patched package passes against both the current Rcpp branch and released Rcpp 1.1.2. Results with the default start values are unchanged.