Skip to content

Match C_cls with SandwichLayer@keys in leave-one-cluster-out variance estimates #252

@jwasserman2

Description

@jwasserman2

When observations are excluded from a covariance adjustment model fit (as tracked in stats::na.action(SandwichLayer@fitted_covariance_model)), the following code produces a vector of ID's that doesn't align with the row dimension of SandwichLayer@keys:

propertee/R/teeMod.R

Lines 489 to 494 in 2b726c0

C_cls <- Reduce(
function(l, r) paste(l, r, sep = "_"),
as.list(stats::expand.model.frame(cmod, cluster)[, cluster, drop=FALSE])
)
}
jk_units <- unique(C_cls[in_Q])

This leads to some units being jackknifed that need not be.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions