Learn R Programming

packDAMipd (version 0.2.0)

do_diagnostic_glm: Do the diagnostic test for glm model assumption

Description

Do the diagnostic test for glm model assumption

Usage

do_diagnostic_glm(
  method = "glm",
  fit,
  expression_recreated,
  param_to_be_estimated,
  dataset,
  indep_var,
  covariates,
  interaction
)

Arguments

method

param describing the methods, expects glm

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

Run this code
# NOT RUN {
datafile = system.file("extdata", "binary.csv", package = "packDAMipd")
mydata <- read.csv(datafile)
results_logit <- use_generalised_linear_model("admit",dataset = mydata,
indep_var = "gre", family = "binomial", covariates = NA,
interaction = FALSE,naaction = "na.omit", link = NA)
do_diagnostic_glm("glm", results_logit$fit, results_logit$fit$call,
"admit",mydata, "gre", covariates = NA, interaction = FALSE)
# }

Run the code above in your browser using DataLab