biasApp: Statistics app: Demonstrates changes in coefficients as model...

Description Usage Arguments Details Author(s) Examples

Description

An app investigating model bias

Usage

1
biasApp(model_formula, data = CPS85, display = c("normal", "showcase"))

Arguments

model_formula

A formula describing the model to use as "reality"

display

Whether to show the code behind the app. Default: don't show it.

data_table

The dataframe used to fit the model.

Details

The original model is created from the original data set and the model given by expr. The response variable is taken to be the term on the left side of your original formula. All other terms are considered explanatory, and they are displayed as checkboxes in the manipulate box. By checking these, each term is added to the new model. The old model coefficient is plotted as a dotted line on each number line, and the new confidence interval and coefficient is plotted in red. The user may vary the confidence level and may vary the number of data points resampled to change the placement and size of the confidence intervals. There is also a original data checkbox which disables the n points to sample slider, as original data is used. When original data is checked as well as only the terms in the original model, the confidence intervals should align with the original predictions. There is a random seed slider to set the random seed. By default its initial value is random.

This applet allows users to see that a linear model will be drastically different with different terms in it. A confidence interval is only applicable to its own model or hypothesis test, it is not universally valid.

Author(s)

Andrew Rich (andrew.joseph.rich@gmail.com) ,Daniel Kaplan (kaplan@macalester.edu) ,Mengdie Wang(mwang3@macalester.edu) and Jingjing Yang(jyang1@macalester.edu)

Examples

1
2
biasApp(wage ~ age + educ, data=CPS85)
biasApp(wage ~ age, data = CPS85, display = "showcase") #if you want to display the code

farfallawang/mosaicApps documentation built on May 16, 2019, 10:09 a.m.