lrcagg: Calculate the observed Distribution of LRCs in Local Control...

lrcaggR Documentation

Calculate the observed Distribution of LRCs in Local Control Strategy

Description

For a given number, K, of Clusters of Experimental Units in baseline X-covariate space, lrcagg() calculates the observed distribution of "Local Rank Correlations" (LRCs) across Clusters ...where each LRC = cor(trex, Y, method = "spearman") within a Cluster, trex is a numeric measure of Exposure, and Y is a numeric measure of Outcome.

Usage

  lrcagg(K, envir)

Arguments

K

Number of Clusters in baseline X-covariate space.

envir

R environment output by a previous call to LCsetup().

Details

Multiple calls to lrcagg(K) for varying numbers of clusters, K, are typically made after first invoking LCcluster() to hierarchically cluster patients in X-space and then invoking LCsetup() to specify a Y Outcome variable and a continuous, numerical treatment Exposure: trex. lrcagg() computes an observed LRC Distribution, updates information stored in its envir object, and outputs an object that is typically saved in the user's .GlobalEnv to allow subsequent use by print.lrcagg(), plot.lrcagg(), confirm() or KSperm(). Uninformative Clusters (those containing only 1 or 2 experimental units) contribute NA values to the LRCtabl$LRC and LRCdist$LRC objects within the lrcagg() output list.

Value

An output list of 12 objects, of class lrcagg:

hclobj

Name of clustering dendrogram object created by LCcluster().

dframe

Name of data.frame containing X, trex & Y variables.

trex

Name of numerical treatment/exposure level variable.

yvar

Name of outcome Y variable.

K

Number of Clusters Requested.

actclust

Number of Clusters delivered.

LRCtabl

data.frame with 5 columns and K rows for Clusters.

LRCtabl$c

Cluster ID Factor, "1", "2", ..., "K".

LRCtabl$LRC

Numerical value of Local Treatment Difference for a Cluster.

LRCtabl$w

Integer value of "weight" = Cluster Size.

LRCtabl$LAO

Numerical value of within-cluster Local Average Outcome (Y-value).

LRCtabl$PS

Numerical value of Local Relative Propensity for Exposure, 0.0 to 1.0.

LRCdist

data.frame with 5 columns and same number of rows as the data: dframe.

LRCdist$c.K

Cluster ID Variable of the form: "c.K"

LRCdist$ID

Observation ID Variable for the rows of the input dframe.

LRCdist$y

Numerical values of Y-Outcomes for Experimental Units.

LRCdist$t

Numerical values of Treatment-Exposure Levels for Experimental Units.

LRCdist$LRC

Numerical values of the LRC for the Cluster containing each Unit.

infoclus

Integer value of Number of Informative Clusters.

infounits

Integer value of Number of Units within Informative Clusters.

LRCmean

Numerical value of mean(LRCdist$LRC) = Weighted Average of LRCtabl$LRC values.

LRCstde

Numerical value of sqrt(var(LRCdist$LRC)) = Weighted Standard Deviation of LRCtabl$LRC values.

Author(s)

Bob Obenchain <wizbob@att.net>

References

Obenchain RL. (2010) The 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

ivadj, ltdagg and LCcompare.

Examples

    data(radon)
    xvars <- c("obesity", "over65", "cursmoke")
    hclobj <- LCcluster(radon, xvars)
    e <- LCsetup(hclobj, radon, lnradon, lcanmort)
    lrc050 <- lrcagg(50, e)
    lrc050
    plot(lrc050, e)

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