prediction_regression: Do the prediction for regression

View source: R/help_parameter_estimation_functions.R

prediction_regressionR Documentation

Do the prediction for regression

Description

Do the prediction for regression

Usage

prediction_regression(
  method,
  fit,
  expression_recreated,
  param_to_be_estimated,
  indep_var,
  covariates,
  interaction
)

Arguments

method

param describing the methods, expects lm

fit

results of the regression fit

expression_recreated

the expression recreated for calling lm

param_to_be_estimated

parameter of interest

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


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)
predict = prediction_regression("lm",results_logit$fit,
results_logit$fit$call, "admit",covariates = NA,"gre", FALSE )


packDAMipd documentation built on May 29, 2024, 3:18 a.m.