predint {MMRcaseselection}R Documentation

Classification of cases as typical and deviant using a prediction interval.

Description

Case are designated as typical (= well predicted) and deviant (= badly predicted) based on the prediction interval. The x% prediction interval represents the range that we expect to include x% of outcome values in repeated samples. For example, a 95% prediction interval ranging from 0-5 conveys that 95% of future outcome values will be in the range of 0-5. If the observed outcome is inside the prediction interval, the case is classified (or designated) as typical and as deviant otherwise.

Usage

predint(lmobject, piwidth = 0.95)

Arguments

lmobject

Object generated with lm

piwidth

Width of the prediction interval (default is 0.95).

Details

Proposed by Rohlfing, Ingo and Peter Starke (2013): Building on Solid Ground: Robust Case Selection in Multi-Method Research. *Swiss Political Science Review* 19 (4): 492-512. (https://doi.org/10.1111/spsr.12052)

Value

A dataframe with the observed outcome, fitted outcome, upper and lower bound of the % prediction interval and classification of cases as typical or deviant.

Examples

df <- lm(mpg ~ disp + wt, data = mtcars)
predint(df, piwidth = 0.9)


[Package MMRcaseselection version 0.1.0 Index]