mlme.data {LocalControlStrategy}R Documentation

Create a Most-Like-Me data.frame for a given Patient ID or specified X-Confounder vector

Description

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.

Usage

  mlme.data(envir, hcl, LCagg, IDval=NULL, xvec=NULL )

Arguments

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.

Details

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.

Value

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.

Author(s)

Bob Obenchain <wizbob@att.net>

References

Obenchain RL. LocalControlStrategy-vignette. (2019) LCstrategy_in_R.pdf http://localcontrolstatistics.org

See Also

plot.mlme.data,print.mlme.data

Examples

  ## 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)

[Package LocalControlStrategy version 1.3.3 Index]