powered by
This function is a wrapper for linrclus. It requires less input.
linrclus
CCRls.coord(Y, X, k, nC = 1, ...)
vector of outcome variable
matrix of covariates. Should not include 1's for the intercept
number of clusters
first nC-1 covariates in X not to cluster. Must be at least 1 for the intercept
additional parameters to be passed to lm
mobj the low dimension lm regression object
mobj
clus cluster assignments of covariates (excluding the first nC covariates - including the intercept 1)
clus
# NOT RUN { set.seed(14) #Generate data N = 1000; (bets = rep(-2:2,4)); p = length(bets); X = matrix(rnorm(N*p),N,p) Y = cbind(1,X)%*%matrix(c(0.5,bets),ncol = 1) CCRls.coord(Y,X,k=5,nC=1) # }
Run the code above in your browser using DataLab