get_clustered_eps {RRI} | R Documentation |
Calculate residuals restricted under H0
Description
Given regression model
and clustering
, this function calculates the OLS residuals
under the linear null hypothesis, and assigns them to the specified clusters.
Usage
get_clustered_eps(model, clustering)
Arguments
model |
A regression |
clustering |
A |
Value
A List
of the restricted residuals clustered according to clustering
.
Examples
m = example_model(n=100)
cl = list(1:50, 51:100)
er = get_clustered_eps(m, cl)
stopifnot(length(er) == length(cl))
stopifnot(length(er[[1]]) == 50)
[Package RRI version 1.1 Index]