do_diagnostic_linear_regression: Do the diagnostic test for lm model assumption

Description Usage Arguments Value Examples

View source: R/help_parameter_estimation_functions.R

Description

Do the diagnostic test for lm model assumption

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
do_diagnostic_linear_regression(
  method,
  fit,
  expression_recreated,
  param_to_be_estimated,
  dataset,
  indep_var,
  covariates,
  interaction
)

Arguments

method

param describing the methods, expects lm

expression_recreated

the expression recreated for calling lm

param_to_be_estimated

parameter of interest

dataset

data set to be provided

indep_var

the independent variable (column name in data file)

covariates

list of covariates - calculations to be done before passing

interaction

boolean value to indicate interaction in the case of linear regression, false by default

Value

the results of the regression analysis

Examples

1
2
3
4
5
6
7
datafile = system.file("extdata", "binary.csv", package = "packDAMipd")
mydata <- read.csv(datafile)
results_logit <- use_linear_regression("admit",dataset = mydata,
indep_var = "gre",covariates = NA, interaction = FALSE)
do_diagnostic_linear_regression("lm", results_logit$fit,
results_logit$fit$call,
"admit", mydata, "gre", covariates = NA , interaction= FALSE)

packDAMipd documentation built on March 3, 2021, 5:07 p.m.