
Last chance! 50% off unlimited learning
Sale ends in
############################################################################ Get the parameter values using logistic regression
use_generalised_linear_model(
param_to_be_estimated,
dataset,
indep_var,
family,
covariates,
interaction,
naaction,
link = NA
)
the results of the regression analysis
parameter of interest
data set to be provided
the independent variable (column name in data file)
distribution name eg. for logistic regression -binomial
list of covariates-calculations to be done before passing
boolean value to indicate interaction in the case of linear regression
action to be taken with the missing values
link function if not the default for each family
This function returns the results and plots after doing linear regression Requires param to be estimated, dataset, independent variables and information on covariates, and interaction variables if there are Uses form_expression_glm to create the expression as per R standard for e.g glm(y ~ x ). Returns the fit result,s summary results as returned by summary(), confidence interval for fit coefficients (ci_coeff), variance covariance matrix, cholesky decomposition matrix, results from correlation test, plot of diagnostic tests and model fit assumptions, plot of model prediction diagnostic include AIC, R2, and BIC. The results of the prediction ie predicted values for fixed other variables will be returned in prediction matrix
# \donttest{
gm_result <- use_generalised_linear_model(
param_to_be_estimated = "Direction",
dataset = ISLR::Smarket, indep_var = "Lag1", family = "binomial",
covariates = c("Lag2", "Lag3"),
interaction = FALSE, naaction = "na.omit", link = NA)
# }
Run the code above in your browser using DataLab