stepwise_fit_model: Fit best model linear regression model using AIC as...

Description Usage Arguments Value Examples

View source: R/stepwise_fit_model.R

Description

Two models are returned, a base model which includes all values at phenotypes dataframe, and a stepwise fitted model using Akaike Information Criterion.

Usage

1
stepwise_fit_model(y, phenotypes, ...)

Arguments

y

Array of values

phenotypes

Data frame with phenotype-related covariables

...

List of other parameters related with MASS::stepAIC function

Value

List with base and fitted linear regression models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
  stepwise_fit_model(
    y = rnorm(100, 1, 10),
    data.frame(covar = rnorm(100,  1, 1), covar2 = rnorm(100, 1, 1) )
  )


  stepwise_fit_model(
    y = rnorm(100, 1, 10),
    data.frame(covar = rnorm(100,  1, 1), covar2 = rnorm(100, 1, 1) ),
    scope = list(
      lower = ~ covar,
      upper = ~ .
    )
  )


## End(Not run)

lpalomerol/inmuneAssociation documentation built on June 10, 2020, 2:45 p.m.