NUsetup | R Documentation |
Invoke NUsetup() to specify the name of the Hierarchical Clustering object output by NUcluster() 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 NUsetup() as a named object within the user's .GlobalEnv space.
NUsetup(hclobj, dframe, trex, yvar)
hclobj |
Name of a NUcluster() output object created using a cluster::diana or stats::hclust method. |
dframe |
Name of the data.frame containing all X-covariates, the Treatment/Exposure variable and the Y-Outcome variable. |
trex |
Name of the numerical Treatment/Exposure variable. |
yvar |
Name of the numerical Y-Outcome variable. |
The environment output by NUsetup() must be saved to the user's .GlobalEnv space. It's contents will be automatically updated by calls to other NU.Learning functions:
aggdf |
data.frame with 4 columns and 1 row for each call to ltdagg() or lrcagg(). |
aggdf$Label |
Factor value of "LTD" or "LRC". |
aggdf$Blocks |
K = integer Number of Clusters requested. |
aggdf$LTDmean or aggdf$LRCmean |
numerical value of cluster mean of LTD or LRC estimates. |
aggdf$LTDstde or aggdf$LRCstde |
numerical value of the within-cluster standard deviation. |
boxdf |
data.frame of 2 variables ...for input to boxplot() by NUcompare(). |
boxdf$NUstat |
LTD or LRC estimate for a single experimental unit from ltdagg() or lrcagg(). |
boxdf$K |
Number of Cluters used in forming the LTD or LRC estimate for each Experimental Unit. |
Kmax |
Maximum Number of Clusters so that Average Size will be >= 12 experimental units. |
LTDmax or LRCmax |
Maximum Treatment Effect-Size estimate across Clusters. |
LTDmin or LRCmin |
Minimum Treatment Effect-Size estimate across Clusters. |
NumLevels |
Integer number of distinct Levels of the Treatment/Exposure variable: trex. |
pars |
Character data.frame with 4 columns and 1 row. |
pars[1,1] |
Name of the diana or hclust object created by NUcluster(). |
pars[1,2] |
Name of data.frame containing the X, Treatment/Exposure and Y variables. |
pars[1,3] |
Name of Treatment/Exposure variable within data.frame pars[1,2]. |
pars[1,4] |
Name of Y-outcome variable within data.frame pars[1,2]. |
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. (2023) NU.Learning_in_R.pdf http://localcontrolstatistics.org
ltdagg
, ivadj
and lrcagg
.
# Running takes about 7 seconds...
data(pci15k)
xvars = c("stent", "height", "female", "diabetic", "acutemi", "ejfract", "ves1proc")
hclobj = NUcluster(pci15k, xvars)
NUe = NUsetup(hclobj, pci15k, thin, surv6mo)
ls.str(NUe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.