Skip to content

Commit

Permalink
Avoid potential bug with Matrix library, by ensuring that `design$sub…
Browse files Browse the repository at this point in the history
…set` is a logical vector.
  • Loading branch information
bschneidr committed Jul 9, 2024
1 parent 6b4f361 commit 76beceb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/quadratic_forms_of_survey_design_objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ get_design_quad_form.twophase2 <- function(design, variance_estimator,
variance_estimator = variance_estimator[[1]],
aux_var_names = aux_var_names
)
Sigma_phase1 <- Sigma_phase1[design$subset, design$subset]
Sigma_phase1 <- Sigma_phase1[
as.logical(design$subset),
as.logical(design$subset)
]

# Extract the quadratic form for second phase
# (conditional on first phase sample)
Expand Down

0 comments on commit 76beceb

Please sign in to comment.