Invoke LCsetup() to specify the name of the Hierarchical Clustering object output by LCcluster() and the name of the data.frame containing all desired X-covariates, the Treatment/Exposure variable and the Y-Outcome variable. It is ESSENTIAL to save the Environment output by LCsetup() as a named object within the user's .GlobalEnv space.
LCsetup(hclobj, dframe, trex, yvar)
The environment output by LCsetup() must be saved to the user's .GlobalEnv space. It's contents will be automatically updated by calls to other LocalControlStrategy functions:
data.frame with 4 columns and 1 row for each call to ltdagg() or lrcagg().
Factor value of "LTD" or "LRC".
K = integer Number of Clusters requested.
numerical value of cluster mean of LTD or LRC estimates.
numerical value of the within-cluster standard deviation.
data.frame of 2 variables ...for input to boxplot() by LCcompare().
LTD or LRC estimate for a single experimental unit from ltdagg() or lrcagg().
Number of Cluters used in forming the LTD or LRC estimate for each Experimental Unit.
Maximum Number of Clusters so that Average Size will be >= 12 experimental units.
Maximum Treatment Effect-Size estimate across Clusters.
Minimum Treatment Effect-Size estimate across Clusters.
Integer number of distinct Levels of the Treatment/Exposure variable: trex.
Character data.frame with 4 columns and 1 row.
Name of the diana or hclust object created by LCcluster().
Name of data.frame containing the X, Treatment/Exposure and Y variables.
Name of Treatment/Exposure variable within data.frame pars[1,2].
Name of Y-outcome variable within data.frame pars[1,2].
Name of a LCcluster() output object created using a cluster::diana or stats::hclust method.
Name of the data.frame containing all X-covariates, the Treatment/Exposure variable and the Y-Outcome variable.
Name of the numerical Treatment/Exposure variable.
Name of the numerical Y-Outcome variable.
Bob Obenchain <wizbob@att.net>
Obenchain RL. (2010) Local Control Approach using JMP. Chapter 7 of Analysis of Observational Health Care Data using SAS, Cary, NC:SAS Press, pages 151-192.
Obenchain RL. (2019) LCstrategy_in_R.pdf http://localcontrolstatistics.org
ltdagg
, ivadj
and lrcagg
.
if (FALSE) {
# Long running example...
data(pci15k)
xvars <- c("stent", "height", "female", "diabetic", "acutemi", "ejfract", "ves1proc")
hclobj <- LCcluster(pci15k, xvars)
LCe <- LCsetup(hclobj, pci15k, thin, surv6mo)
ls.str(LCe)
}
Run the code above in your browser using DataLab