Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epbc

!!!it's in beta!!!

This package helps you deal with multiple models with multiple explanatory variables while you create your linear or nonlinear model. This package takes your data and puts them thru stepwise AIC then puts every model in thru chisq test and checks the significance of each variable. It automatically eliminates variables that resulted below the threshold value. If there were no explanatory variables left in the model that model will be excluded from the results.

Example data:

Explanatory 1 Explanatory 2 Explanatory 3 Model Var 1 Model Var 2 Model Var 3
Observation 1 1 1 8 2 3 5
Observation 2 5 2 2 0 7 4
Observation 3 3 3 6 1 0 8
Observation 4 3 5 0 3 5 5
Observation 5 9 1 4 7 1 3
Observation 6 0 9 1 0 3 5

To install:

library(devtools)

install_github("https://github.com/NitroxHead/epbc")

Example usage:

elko(example_data,3,0.05)

ciyl(example_data,"glm(",", "family = poisson(link='log'))",3,0.05)

croyer(example_data,"glm(",", "family = poisson(link='log'))",3,0.05,1,1,"Chisq")

Example working process for croyer;

m1 = glm(Model Var 1 ~ +1, data = example_data,family = poisson(link='log'))

m1AIC = step(m.1l, scope = Explanatory 1 + Explanatory 2 + Explanatory 3)

tosv = drop1(m1AIC,test = "Chisq")

if any variable is smaller then determined threshold (in this case 0.05) it will be deleted.

a new model will be formed with the reaming explanatory variables ( in this case lets say only Explanatory 2 didn't meet the requirements).

nmdel = glm( Model Var 1 ~Explanatory 1 + Explanatory 3, family = poisson(link='log'))

tnm = drop1(nmdel,test = "Chisq")

if asked for it table will be formed. at the table (if a model only has +1 as explanatory variable it will excluded).

Sample table output without test:

Explanatory 1 Explanatory 2 Explanatory 3
Model Var 1 1 0 1
Model Var 2 0 1 1
Model Var 3 1 1 0

Sample table output with test:

Explanatory 1 Explanatory 2 Explanatory 3
Model Var 1 0.012 0 0.023
Model Var 2 0 0.014 0.042
Model Var 3 0.034 0.029 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages