GetPredCompsDF: GetApcDF

Description Usage Arguments Examples

Description

makes average predictive comparison for all specified inputs

Usage

1
GetPredCompsDF(model, df, inputVars = NULL, ...)

Arguments

model

Either a function (from a data frame to vector of predictions) or a model we know how to deal with (lm, glm)

df

data frame with data

inputVars

inputs to the model

...

extra parguments passed to GetPairs used to control Weight function

Examples

1
2
3
4
5
6
7
8
9
n <- 200
x1 <- runif(n = n, min = 0, max = 1)
x2 <- runif(n = n, min = 0, max = 1)
x3 <- runif(n = n, min = 0, max = 10)
y <- 2 * x1 + (-2) * x2 + 1 * x3 + rnorm(n, sd = 0.1)
df <- data.frame(x1, x2, x3, y)
fittedLm <- lm(y ~ ., data = df)
apcDF <- GetPredCompsDF(fittedLm, df = df)
apcDF

dchudz/predcomps documentation built on May 15, 2019, 1:48 a.m.