LCsetup: Specify KEY parameters used in Local Control (LC) Strategy to...

LCsetupR Documentation

Specify KEY parameters used in Local Control (LC) Strategy to "design" analyses of Observational Data.

Description

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.

Usage

LCsetup(hclobj, dframe, trex, yvar)

Arguments

hclobj

Name of a LCcluster() 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.

Value

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:

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 LCcompare().

boxdf$LCstat

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 LCcluster().

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].

Author(s)

Bob Obenchain <wizbob@att.net>

References

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

See Also

ltdagg, ivadj and lrcagg.

Examples

  ## Not run: 
  # 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)
  
## End(Not run)

LocalControlStrategy documentation built on Nov. 10, 2022, 5:49 p.m.