indbcomp | R Documentation |
Comparing Independent Coefficients in Multiple Regression
indbcomp(model1 = NULL, model2 = NULL, comps = "abs")
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 |
Comparing Independent Coefficients in Multiple Regression
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.