predFit: Predictions from a Fitted Model

View source: R/predFit.R

predFitR Documentation

Predictions from a Fitted Model

Description

Generic prediction method for various types of fitted models. predFit can be used to obtain standard errors of fitted values and adjusted/unadjusted confidence/prediction intervals for objects of class "lm", "nls".

Usage

predFit(object, ...)

## Default S3 method:
predFit(object, ...)

## S3 method for class 'nls'
predFit(
  object,
  newdata,
  se.fit = FALSE,
  interval = c("none", "confidence", "prediction"),
  level = 0.95,
  adjust = c("none", "Bonferroni", "Scheffe"),
  k,
  ...
)

Arguments

object

An object that inherits from class "lm", "nls".

...

Additional optional arguments. At present, no optional arguments are used.

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.

se.fit

A logical vaue indicating if standard errors are required. Default is FALSE.

interval

Type of interval to be calculated. Can be one of "none" (default), "confidence", or "prediction". Default is "none".

level

A numeric scalar between 0 and 1 giving the confidence level for the intervals (if any) to be calculated. Default is 0.95.

adjust

A logical value indicating if an adjustment should be made to the critical value used in calculating the confidence interval. This is useful for when the calibration curve is to be used multiple, say k, times. Default is FALSE.

k

The number times the calibration curve is to be used for computing a confidence/prediction interval. Only needed when adjust = "Bonferroni".

Value

No return value (called for side effects).

Note

predFit function is from 'investr' package written by Brandon M. Greenwell.

References

Greenwell B. M., and Schubert-Kabban, C. M. (2014) investr: An R Package for Inverse Estimation. The R Journal, 6(1), 90-100.

See Also

predFit


ggtrendline documentation built on April 27, 2022, 9:06 a.m.