mlme.data {LocalControlStrategy} | R Documentation |
For a given Patient ID Number (IDval) or a Given X-confounder Vector (xvec), sort all Patients in an ltdagg() or lrcagg() output object into the strictly non-decreasing order of their distances from the given Patient or X-Vector. The plot.mlme.data() and print.mlme.data() functions can then be invoked to Display and Summarize the Local effect-size Distributions for a sequence of different Numbers of "Nearest Neighbor" patients.
mlme.data(envir, hcl, LCagg, IDval=NULL, xvec=NULL )
envir |
Environment output by a call to the LCsetup() function. |
hcl |
Name of a LCcluster() output object created using a cluster::diana or stats::hclust method. |
LCagg |
A data.frame object output by ltdagg() or lrcagg() containing Local effect-size estimates for patients within Clusters defined in X-covariate space. |
IDval |
NULL or one of the Unique values for the Patient ID variable. |
xvec |
Must be suitable vector of Numerical values for X-Confounder variables when the IDval argument is NULL. Alternatively, xvec must be NULL when IDval is non-NULL. |
An invocation of mlme.data(envir, hcl, LCagg=ltdagg(), ...) or mlme.data(envir, hcl, LCagg=lrcagg(), ...) requires specification of exactly ONE non-NULL argument for either IDval or xvec.
An output list object of class mlme.data:
IDval |
NULL or the Unique Patient ID value input to mlme.data(). |
xvec |
NULL or the xvec vector input to mlme.data(). |
Type |
Either "LTD" or "LRC". |
xvars |
A list of the X-Confounder variable names specified in LCsetup(). |
varx |
The vector of Variances of the xvar variabes used in rescaling distances. |
outdf |
The output data.frame of sorted "Nearest Neighbor" candidate patients. |
Bob Obenchain <wizbob@att.net>
Obenchain RL. LocalControlStrategy-vignette. (2019) LCstrategy_in_R.pdf http://localcontrolstatistics.org
plot.mlme.data
,print.mlme.data
## Not run: # Long running example... data(pci15k) xvars <- c("stent", "height", "female", "diabetic", "acutemi", "ejfract", "ves1proc") hclobj <- LCcluster(pci15k, xvars) LC.env <- LCsetup(hclobj, pci15k, thin, surv6mo) cost0500 <- ltdagg(500, LC.env) mlmeC5H <- mlme.data(envir = LCe, hcl = hclobj, LCagg = cost0500, IDval = 11870 ) plot(mlmeC5H) # using default "NN" and "breaks" settings... ## End(Not run)