LinReg {HanStat}R Documentation

LinReg

Description

A simple multiple linear regression function (OLS) and it's requirements. The function automatically interprets the results, creates plots and provides an indication of violations of assumptions. It also calculates the effect sizes of the models. The bootstrapping method can also be used.

Usage

LinReg(dv, iv, data, BS, NBS, OC, plot)

Arguments

dv

dependent variable name as a string

iv

a string vector with the names of the independent variables, separated by commas, use c(iv_1,iv_2...iv_n)

data

a data frame containing the variables

BS

Bootstrapping method, set BS to TRUE or FALSE, if FALSE Number of bootstraps are ignored

NBS

number of random samples used for bootstrapping

OC

Outlier controll, set OS to TRUE or FALSE, to use cooks distance to exclude outliers, if BS==TRUE, OS must be FALSE

plot

set plot to TRUE to create simple scatterplots of correlation between variables

Value

the results of linear regression, plots and all requirements plus an interpretation & conclusion about the violations

Source

https://www.hanseatic-statistics.de

Examples

m<-LinReg('dv',c('iv_1','iv_2','iv_3'),data=data,BS=FALSE,NBS=1000,OC=FALSE,plot=TRUE)
print(m$Results)
print(m$Require)
print(m$Plots)

[Package HanStat version 0.90.0 Index]