gemm: Fit General Monotone Models.

Description Usage Arguments Details Value References See Also Examples

View source: R/gemmquick.R

Description

gemm is used to fit general monotone models. By default, the function will generate metric weights that minimize rank order inversion between the model predictions and a response variable, subject to a parsimony correction. Optional argument passed to gemmEst.

Usage

1
2
3
4
5
## S3 method for class 'formula'
gemm(formula, data=list(), ...)

## Default S3 method:
gemm(x, k.pen, n.chains = 4, fit.metric = "bic", ...)

Arguments

formula

an object of the class formula.

data

optional data frame, list, or environment.

x

must be data frame, first column is treated as dependent variable. Not needed if formula is supplied.

k.pen

vector of integers giving penalty equivalent to main effects for any interaction terms. Calculated by gemm.formula or defaults to no special interaction weighting.

n.chains

number or replications of the sampling process, used to assess various starting conditions

fit.metric

Value to optimize with genetic algorithm. Currently accepts “bic”, “aic”, and “tau”.

...

Additional arguments to be passed to lower level fitting functions (see below).

Details

Models for gemm are constructed with syntax similar to lm. By default, gemm will use random search to minimize penalized rank order inversions between model predictions and a response variable. This is accomplished by generating candidate weights using genAlg and deriving a BIC based on transformed Kendall's tau using gemmFitRcppI. gemm may take some time to run depending on the complexity of the model. Methods for standard goodness-of-fit functions are also available and are run by summary.gemm.

Value

A list with class "gemm" containing the following components:

date

system time and date for model completion.

call

the matched call.

coefficients

matrix of best weights with one row for each chain.

fitted.values

model predictions for criterion generated from weights associated with best chain.

residuals

metric values for response minus fitted.

rank.residuals

rank response minus rank criterion.

bic

vector of Bayesian Information Criteria for estimation sample of each chain.

aic

vector of Aikaike Information Criteria for estimation sample of each chain.

r

vector of Pearson's r values for estimation sample of each chain.

tau

vector of Kendall's tau for estimation sample of each chain.

metric.betas

regression weights derived using lm.

p.vals

p-values associated with ordinary least squares regression weights.

model

data frame including modeled data.

fit.metric

sorting metric used.

cross.val.bic

vector of Bayesian Information Criteria for cross-validation sample of each chain.

cross.val.aic

vector of Aikaike Information Criteria for cross-validation sample of each chain.

cross.val.r

vector of Pearson's r values for cross-validation sample of each chain.

cross.val.tau

vector of Kendall's tau for cross-validation sample of each chain.

converge.fit.metric

matrix of "fit.metric" values with generations by chains.

converge.beta

matrix derived weights for each generation within each chain, column for each predictor.

converge.r

generations by chains matrix of Pearson's r.

formula

formula object used.

References

Dougherty, M. R., & Thomas, R. P. (2012). Robust decision making in a nonlinear world. Psychological review, 119(2), 321.

See Also

genAlg for search, gemmFitRcppI for fitting routine, tauTest for O*(N log N) scale Kendall's tau, convergencePlot for the optional plot pane when check.convergence = TRUE. gemmEst may be useful in some circumstances when formula input and interaction terms are not needed.

Examples

1
2
3
4
5
6
7
  ## Not run: 
    data(culture)
    gemm.model <- gemm(mpg ~ disp + cyl, data = mtcars, check.convergence = TRUE)
    print(gemm.model)
    plot(gemm.model)
  
## End(Not run)

jchrszcz/gemmR documentation built on May 18, 2019, 10:24 p.m.