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.
LocalControlClassic(
data,
clusterVars,
treatmentColName,
outcomeColName,
faclev = 3,
scedas = "homo",
clusterMethod = "ward",
clusterDist = "euclidean",
clusterCounts = c(50, 100, 200)
)
The data frame containing all baseline X covariates.
List of names of X variable(s).
Name of treatment factor variable.
Name of outcome Y variable.
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.
Scedasticity assumption: "homo" or "hete".
Type of clustering method, defaults to "complete". Currently implemented methods: "ward", "single", "complete" or "average".
Distance type to use, defaults to "euclidean". Currently implemented: "euclidiean", "manhattan", "maximum", or "minkowski".
A vector containing different number of clusters in baseline X-covariate space which Local Control will iterate over.
Returns a list containing several elements.
Name of clustering object created by UPShclus().
Name of data.frame containing X, t & Y variables.
Name of treatment factor variable.
Name of outcome Y variable.
Number of clusters requested.
Number of clusters actually produced.
Scedasticity assumption: "homo" or "hete"
Character string describing the treatment difference.
Vector containing cluster number for each patient.
Unadjusted outcome mean by treatment group.
Unadjusted outcome variance by treatment group.
Number of patients by treatment group.
Unadjusted mean outcome difference between treatments.
Standard error of unadjusted mean treatment difference.
Unadjusted mean outcome by cluster and treatment.
Unadjusted variance by cluster and treatment.
Number of patients by bin and treatment.
Across cluster average difference with cluster size weights.
Standard error of awbdif.
Across cluster average difference, inverse variance weights.
Standard error of wwbdif.
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.
"continuous" => only next eight outputs; "factor" => only last three outputs.
ANOVA summary for treatment main effect only.
Formula for outcome differences due to bins and to treatment nested within bins.
ANOVA summary for treatment nested within cluster.
Estimate of error mean square in nested model.
Unadjusted treatment difference by cluster.
Standard error of the unadjusted difference by cluster.
Cluster radii measure: square root of total number of patients.
Symbol size of largest possible Snowball in a UPSnnltd() plot with 1 cluster.
Marginal table of counts by Y-factor level and treatment.
Cumulative Chi-Square statistic for interaction in the three-way, nested table.
Degrees of-Freedom for the Cumulative Chi-Squared.
Obenchain, RL. USPS package: Unsupervised and Supervised Propensity Scoring in R. https://cran.r-project.org/src/contrib/Archive/USPS/ 2005.
Obenchain, RL. The ''Local Control'' Approach to Adjustment for Treatment Selection Bias and Confounding (illustrated with JMP Scripts). Observational Studies. Cary, NC: SAS Press. 2009.
Obenchain RL. The local control approach using JMP. In: Faries D, Leon AC, Haro JM, Obenchain RL, eds. Analysis of Observational Health Care Data Using SAS. Cary, NC: SAS Institute; 2010:151-194.
Obenchain RL, Young SS. Advancing statistical thinking in observational health care research. J Stat Theory Pract. 2013;7(2):456-506.
Faries DE, Chen Y, Lipkovich I, Zagar A, Liu X, Obenchain RL. Local control for identifying subgroups of interest in observational research: persistence of treatment for major depressive disorder. Int J Methods Psychiatr Res. 2013;22(3):185-194.
Lopiano KK, Obenchain RL, Young SS. Fair treatment comparisons in observational research. Stat Anal Data Min. 2014;7(5):376-384.
Young SS, Obenchain RL, Lambert CG (2016) A problem of bias and response heterogeneity. In: Alan Moghissi A, Ross G (eds) Standing with giants: A collection of public health essays in memoriam to Dr. Elizabeth M. Whelan. American Council on Science and Health, New York, NY, pp 153-169.
# NOT RUN {
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))
# }
Run the code above in your browser using DataLab