get_parameter_estimated_regression: Get the parameter values using the provided statistical...

Description Usage Arguments Details Value Examples

View source: R/2a_parameter_estimation_functions.R

Description

Get the parameter values using the provided statistical regression methods

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
get_parameter_estimated_regression(
  param_to_be_estimated,
  data,
  method,
  indep_var,
  info_get_method = NA,
  info_distribution = NA,
  covariates = NA,
  timevar_survival = NA,
  interaction = FALSE,
  fix_eff = NA,
  fix_eff_interact_vars = NA,
  random_intercept_vars = NA,
  nested_intercept_vars_pairs = NA,
  cross_intercept_vars_pairs = NA,
  uncorrel_slope_intercept_pairs = NA,
  random_slope_intercept_pairs = NA,
  naaction = "stats::na.omit",
  param2_to_be_estimated = NA,
  covariates2 = NA,
  interaction2 = FALSE,
  link = NA,
  cluster_var = NA,
  package_mixed_model = NA
)

Arguments

param_to_be_estimated

parameter of interest

data

data to be provided or the data file containing dataset

method

method of estimation (for example, linear, logistic regression etc)

indep_var

the independent variable (column name in data file)

info_get_method

additional information on methods e.g Kaplan-Meier ot hazard

info_distribution

distribution name eg. for logistic regression -binomial

covariates

list of covariates-calculations to be done before passing

timevar_survival

time variable for survival analysis

interaction

boolean value to indicate interaction in the case of linear regression

fix_eff

boolean value to indicate interaction in the case of linear regression

fix_eff_interact_vars

boolean value to indicate interaction in the case of linear regression

random_intercept_vars

boolean value to indicate interaction in the case of linear regression

nested_intercept_vars_pairs

boolean value to indicate interaction in the case of linear regression

cross_intercept_vars_pairs

boolean value to indicate interaction in the case of linear regression

uncorrel_slope_intercept_pairs

boolean value to indicate interaction in the case of linear regression

random_slope_intercept_pairs

boolean value to indicate interaction in the case of linear regression

naaction

what action to be taken for the missing values, default is a missing value.

param2_to_be_estimated

parameter of interest for equation 2 in bivariate regression

covariates2

list of covariates - for equation 2 in bivariate regression

interaction2

boolean value to indicate interaction for equation 2 in bivariate regression

link

link function to be provided if not using the default link for each of the info_distribution

cluster_var

cluster variable if any

package_mixed_model

package to be used for mixed model ie nlme or lme4

Details

This function is the top in the layer of functions used for regression analysis Thus it contains many parameters to be passed on The required ones are parameter to be estimated, data that contains the observation, the method of regression to be used, the independent variable and the information for the distribution and method. if the data is given as a file name. it will load the data in that file Then it calls the appropriate functions depending on the regression method that specified. The methods that are considered : Survival analysis, linear regression, logistic regression,generalised linear model, linear multilevel or mixed model, and seemingly unrelated regression

Value

results the results of the regression analysis

Examples

1
2
3
4
5
6
7
result <- get_parameter_estimated_regression(
  param_to_be_estimated = "Direction",
  data = ISLR::Smarket, method = "logistic", indep_var = "Lag1",
  info_get_method = NA, info_distribution = "binomial",
  covariates = c("Lag2", "Lag3"), interaction = FALSE,
  naaction = "na.omit", link = NA)
  

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