Skip to content

Commit

Permalink
Merge branch 'main' into y_mis. Add @amytimes pull request.
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorDonegan committed Apr 4, 2024
2 parents 7c7bfac + fc041de commit 59e0b33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/convenience-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,9 @@ prep_icar_data <- function(C, scale_factor = NULL) {
if (m) {
GS <- group_size
ID <- nb2$comp.id
change.to.one <- which(GS == 1)
ID[which(ID == change.to.one)] <- 1
main.group <- ID[which(rowSums(as.matrix(C))!=0)[1]]
change.group <- which(GS == 1)
ID[which(ID %in% change.group)] <- main.group
A = model.matrix(~ factor(ID))
A <- as.matrix(A[,-1])
} else {
Expand Down

0 comments on commit 59e0b33

Please sign in to comment.