#############################################################################
## How to use the function burnham()                                        #
##                                                                          #
## Just  create a LIST of models, e.g. linear regression models,            #
## generalized linear regression model etc.                                 #
## Type "burnham(listofmodels)", the function returnd the model averaged    #
## estimates based on exponential AIC-weights                               #
#############################################################################

# the function needs the following libraries    : ---
# the illustration needs the following libraries: --- 

### An illustration:

## Consider the follwoing simulated data
age <- rpois(100,30)
sex <- rbinom(100,1,0.3)
myresponse <- rnorm(100,10+4*age-0.02*sex,3)

## Consider the following four competing models
M1 <- lm(myresponse ~ age)
M2 <- lm(myresponse ~ sex)
M3 <- lm(myresponse ~ age+sex)
M4 <- lm(myresponse ~ 1)

## Create a list
mymodels <- list(M1,M2,M3,M4)
# Note that the order of the models is not important

# Fast evaluation....
burnham(mymodels)



