gemmEst: Fit General Monotone Models.

Description Usage Arguments Details Value References See Also Examples

View source: R/gemmquick.R

Description

gemmEst is called by gemm to fit general monotone models.

Usage

1
2
3
4
  gemmEst(input.data, output = "gemmr", n.beta = 8000, n.chains = n.chains,
  n.gens = 10, save.results = FALSE, k.pen = k.pen, seed.metric = TRUE,
  check.convergence = FALSE, roe = FALSE, fit.metric = fit.metric,
  correction = "knp", oclo = TRUE, isTauB = FALSE)

Arguments

input.data

must be data frame, first column is treated as dependent variable.

output

string argument for use in naming file output. gemmEst may write a .RData file in the current working directory each time the function is called.

n.beta

number of beta vectors to generate per generation.

n.chains

number of times the fitting process will be repeated.

n.gens

number of generations per chain.

save.results

logical value to determine whether the resulting gemm object is saved to a .RData file.

k.pen

penalty term for BIC, as calculated by gemm.formula.

seed.metric

logical value to control whether genAlg is seeded with OLS regression weights or random values.

check.convergence

logical value to indicate whether BIC for each generation is retained, mostly useful for checking performance of genAlg.

roe

logical value to determine whether region of equivalence data are retained.

fit.metric

value used to order models.

correction

placeholder for correction transformations on the fit statistic, (r or tau).

oclo

logical for Ordered Constrained Linear Optimization. If TRUE secondary sort based on r performed on matrix of beta weights in order to maximize linear fit, given the ordered fits determined by fit.metric.

isTauB

logical for whether to include ties in the denominator of the tau calculation.

Details

Formula syntax and interaction penalty terms can be avoided by fitting data directly using gemmEst.

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.

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.

tau.par

vector containing the correction, incorrect, criterion ties, predictor ties, and both between the weighted cues and outcome used for model fit.

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.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.

cross.val.tau.par

vector containing the correction, incorrect, criterion ties, predictor ties, and both between the weighted cues and outcome used for crossvalidation.

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

gemm for normal use. 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.

Examples

1
2
3
4
5
  data(mtcars)
  gemm.model <- gemm(mpg ~ disp + cyl, data = mtcars,
    check.convergence = TRUE, n.chains = 3, n.gens = 3, n.beta = 200)
  print(gemm.model)
  plot(gemm.model)

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