Type: | Package |
Title: | Package for Easy Interpretation of Statistical Methods |
Version: | 0.90.0 |
Date: | 2023-02-10 |
Maintainer: | Konrad Krahl <Beratung@Hanseatic-Statistics.de> |
URL: | https://github.com/KonradKrahl/HanStat |
BugReports: | https://github.com/KonradKrahl/HanStat |
Description: | A simple and time saving multiple linear regression function (OLS) with interpretation, optional bootstrapping, effect size calculation and all tested requirements. |
Depends: | R (≥ 4.1.0) |
Imports: | boot, car, crayon, ggplot2, lmtest, olsrr, ggpubr, devtools |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.3 |
Language: | en-US |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2023-02-11 13:09:06 UTC; konra |
Author: | Konrad Krahl |
Repository: | CRAN |
Date/Publication: | 2023-02-13 09:20:25 UTC |
Radomized data for testing models
Description
Contains 5 Variables, one dependent, 4 independent. The fourth independent is correlated with the dependent
Usage
data(data)
Format
data.frame
Source
https://www.hanseatic-statistics.de/
References
K.T.Krahl (2023)
Examples
data(data)
LinReg('dv',c('iv_1','iv_2','iv_3','iv_4'),data=data, BS = TRUE, NBS=1000, OC = TRUE, plot=TRUE)
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)
Randomized data for testing models Contains 5 Variables, one dependent, 4 independent. The fourth independent is correlated with the dependent
Description
Randomized data for testing models Contains 5 Variables, one dependent, 4 independent. The fourth independent is correlated with the dependent
Usage
data(data)
Format
data.frame
Source
https://www.hanseatic-statistics.de
References
K.T.Krahl (2023)
Examples
data(data)
LinReg('dv',c('iv_1','iv_2','iv_3'),data=data,BS=FALSE,NBS=1000,OC=FALSE,plot=TRUE)