Open benthestatistician opened 7 hours ago
This would improve usages like the following, taken from the current cov_adj()
example.
data(STARdata)
STARdata$studentid <- as.character(seq_len(nrow(STARdata)))
STARdata_spec <- rct_spec(stark ~ cluster(studentid), data = STARdata)
We could instead recommend
data(STARdata)
STARdata_spec <- rct_spec(stark ~ cluster(), data = STARdata)
(NB: I did try the following without success:
data(STARdata)
STARdata_spec <- rct_spec(stark ~ cluster(data), data = STARdata)
I also got an error from OTOH this works
data(STARdata)
STARdata_spec <- rct_spec(stark ~ cluster(STARdata), data = STARdata)
.)
Can we support
rct_spec(treatment~cluster(), data=foo)
, as meaning that each observation is its own cluster?