Benutzer:Krogmann/R MARS/EARTH

Aus SDQ-Wiki

Links

TODO for StoEx

Integrate Hinge Function: Hinge functions are a key part of MARS models. A hinge function takes the form max(0,x - c) or max(0,c - x) where c is a constant, called the knot.

max(a, b) in StoEx: a > b ? a : b

R Syntax

Laden:

library(earth)

Basissyntax:

earth(x = stop("no 'x' arg"), y = stop("no 'y' arg"),
     weights = NULL, subset = NULL, na.action = na.fail,
     penalty = if(degree > 1) 3 else 2, trace = 0, keepxy = FALSE,
     degree = 1, nk = max(21, 2 * NCOL(x) + 1),
     thresh = 0.001, minspan = 1, newvar.penalty = 0,
     fast.k = 20, fast.beta = 1, fast.h = NULL,
     pmethod = "backward", ppenalty = penalty, nprune = NULL,
     Object  = NULL, Get.crit = get.gcv,
     Eval.model.subsets = eval.model.subsets,
     Print.pruning.pass = print.pruning.pass,
     Force.xtx.prune = FALSE, ...)

Linearisierte Form von Koeffizienten und Hinge-Funktionen:

cat(format(a))

Bsp.:

a <- earth(Volume ~ ., data = trees)
summary(a, digits = 2)

Bsp-Daten:

data(ozone1) / data(trees)