lm_hierarch_d: Hierarchische lineare Regression mit mehreren Bloecken

Description Usage Arguments Value See Also Examples

View source: R/lm_hierarch_d.R

Description

Hierarchichal regression with several blocks estimated in sequence This is basically a wrapper function for lm that splits the formula into user denoted blocks and computes its models in order to evaluate the incremental validity of each predictor set.

Usage

1

Arguments

formula

the complete formula including all blocks from the hierarchical regression

blocks

numeric vector denoting the length of each block e.g. c(2, 3, 1) meaning 2 predictors then 3 predictors then 1 predictor

data

the dataframe holding the variables for the estimation of the lm

summary

should the results be summaries of the lm object

...

additional parameters for lm

Value

list of the regression models

See Also

lm

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# hierarchical regression with 2 blocks, 1:sex, 2: age + school
lm_hierarch(conscien ~ sex + age + school, c(1),data=neoffi)

## End(Not run)
# 4 blocks with each time one additional predictor
lm_hierarch_d(formula=mpg ~ disp + hp + wt + drat, blocks=c(1,1,1,1), summary=TRUE, data=mtcars)
# 2 blocks with each time 2 additional predictors 
lm_hierarch_d(mpg ~ disp + hp + wt + drat, c(2,2), data=mtcars) 

lillion/emittr documentation built on May 10, 2020, 7:23 a.m.