indbcomp {BetterReg} | R Documentation |
Comparing Independent Coefficients in Multiple Regression
Description
Comparing Independent Coefficients in Multiple Regression
Usage
indbcomp(model1 = NULL, model2 = NULL, comps = "abs")
Arguments
model1 |
Summary of first model (see example for how to summarize) |
model2 |
Summary of second model (see example for how to summarize) |
comps |
Type of comparison. "abs" - absolute value of coefficient (recommended). "raw" raw values of coefficient |
Value
Comparing Independent Coefficients in Multiple Regression
Examples
y_1<-rnorm(200); x1_1<-rnorm(200); x2_1<-rnorm(200)
y_2<-rnorm(200); x1_2<-rnorm(200);x2_2<-rnorm(200)
df1<-as.data.frame(cbind(y_1, x1_1,x2_1))
df2<-as.data.frame(cbind(y_2, x1_2,x2_2))
model1_2<-summary(lm(y_1~x1_1+x2_1, data=df1))
model2_2<-summary(lm(y_2~x1_2+x2_2, data=df2))
indbcomp(model1 = model1_2, model2 = model2_2, comps="abs")
[Package BetterReg version 0.2.0 Index]