LocalControlClassic: Local Control Classic

Description Usage Arguments Value References Examples

View source: R/clusteringLC.R

Description

LocalControlClassic was originally contained in the deprecated CRAN package USPS, this function is a combination of three of the original USPS functions, UPShclus, UPSaccum, and UPSnnltd. This replicates the original implementation of the Local Control functionality in Robert Obenchain's USPS package. Some of the features have been removed due to deprecation of R packages distributed through CRAN. For a given number of patient clusters in baseline X-covariate space, LocalControlClassic() characterizes the distribution of Nearest Neighbor "Local Treatement Differences" (LTDs) on a specified Y-outcome variable.

Usage

1
2
3
LocalControlClassic(data, clusterVars, treatmentColName, outcomeColName,
  faclev = 3, scedas = "homo", clusterMethod = "ward",
  clusterDist = "euclidean", clusterCounts = c(50, 100, 200))

Arguments

data

The data frame containing all baseline X covariates.

clusterVars

List of names of X variable(s).

treatmentColName

Name of treatment factor variable.

outcomeColName

Name of outcome Y variable.

faclev

Maximum number of different numerical values an outcome variable can assume without automatically being converted into a "factor" variable; faclev=1 causes a binary indicator to be treated as a continuous variable determining an average or proportion.

scedas

Scedasticity assumption: "homo" or "hete".

clusterMethod

Type of clustering method, defaults to "complete". Currently implemented methods: "ward", "single", "complete" or "average".

clusterDist

Distance type to use, defaults to "euclidean". Currently implemented: "euclidiean", "manhattan", "maximum", or "minkowski".

clusterCounts

A vector containing different number of clusters in baseline X-covariate space which Local Control will iterate over.

Value

Returns a list containing several elements.

hiclus

Name of clustering object created by UPShclus().

dframe

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

trtm

Name of treatment factor variable.

yvar

Name of outcome Y variable.

numclust

Number of clusters requested.

actclust

Number of clusters actually produced.

scedas

Scedasticity assumption: "homo" or "hete"

PStdif

Character string describing the treatment difference.

nnhbindf

Vector containing cluster number for each patient.

rawmean

Unadjusted outcome mean by treatment group.

rawvars

Unadjusted outcome variance by treatment group.

rawfreq

Number of patients by treatment group.

ratdif

Unadjusted mean outcome difference between treatments.

ratsde

Standard error of unadjusted mean treatment difference.

binmean

Unadjusted mean outcome by cluster and treatment.

binvars

Unadjusted variance by cluster and treatment.

binfreq

Number of patients by bin and treatment.

awbdif

Across cluster average difference with cluster size weights.

awbsde

Standard error of awbdif.

wwbdif

Across cluster average difference, inverse variance weights.

wwbsde

Standard error of wwbdif.

faclev

Maximum number of different numerical values an outcome variable can assume without automatically being converted into a "factor" variable; faclev=1 causes a binary indicator to be treated as a continuous variable determining an average or proportion.

youtype

"continuous" => only next eight outputs; "factor" => only last three outputs.

aovdiff

ANOVA summary for treatment main effect only.

form2

Formula for outcome differences due to bins and to treatment nested within bins.

bindiff

ANOVA summary for treatment nested within cluster.

sig2

Estimate of error mean square in nested model.

pbindif

Unadjusted treatment difference by cluster.

pbinsde

Standard error of the unadjusted difference by cluster.

pbinsiz

Cluster radii measure: square root of total number of patients.

symsiz

Symbol size of largest possible Snowball in a UPSnnltd() plot with 1 cluster.

factab

Marginal table of counts by Y-factor level and treatment.

cumchi

Cumulative Chi-Square statistic for interaction in the three-way, nested table.

cumdf

Degrees of-Freedom for the Cumulative Chi-Squared.

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 data(lindner)

 cvars <- c("stent","height","female","diabetic","acutemi",
            "ejecfrac","ves1proc")
 numClusters <- c(1, 2, 10, 15, 20, 25, 30, 35, 40, 45, 50)
 results <- LocalControlClassic( data = lindner,
                                clusterVars = cvars,
                                treatmentColName = "abcix",
                                outcomeColName = "cardbill",
                                clusterCounts = numClusters)
 UPSLTDdist(results,ylim=c(-15000,15000))

OHDSI/LocalControl documentation built on July 13, 2018, 3:21 p.m.