Get the parameter values using the provided statistical regression methods
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
)
results the results of the regression analysis
parameter of interest
data to be provided or the data file containing dataset
method of estimation (for example, linear, logistic regression etc)
the independent variable (column name in data file)
additional information on methods e.g Kaplan-Meier ot hazard
distribution name eg. for logistic regression -binomial
list of covariates-calculations to be done before passing
time variable for survival analysis
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
boolean value to indicate interaction in the case of linear regression
what action to be taken for the missing values, default is a missing value.
parameter of interest for equation 2 in bivariate regression
list of covariates - for equation 2 in bivariate regression
boolean value to indicate interaction for equation 2 in bivariate regression
link function to be provided if not using the default link for each of the info_distribution
cluster variable if any
package to be used for mixed model ie nlme or lme4
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
# \donttest{
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)
# }
Run the code above in your browser using DataLab