0

I am running a multiple regression with several predictors to test whether people likely to say they will sign another contract(likert scale). I need to calculate the extra additional variance of each averaged clustered I created of questions, to see if besides having a strong beta coefficients, this cluster actually helps explain people choice to sign additional contract. reproducible example:

indepndent:
avg_direct_supervisor = c(4.66,4,2,2.33,2.66,3.5)
avg_friends = c(4,3.5,4,1,2.5,5)
avg_moving = c(3.4,5,2,3.5,4,3)

dependent: 
sign_contract = c(3,4,5,3,4,2)

now I ran a multiple regression

avg_direct_supervisor = c(4.66,4,2,2.33,2.66,3.5)
avg_friends = c(4,3.5,4,1,2.5,5)
avg_moving = c(3.4,5,2,3.5,4,3)
sign_contract = c(3,4,5,3,4,2)

trial <- data.frame(avg_direct_supervisor,avg_friends,avg_moving,sign_contract)

trial_model <- lm(data = trial,formula = sign_contract~.)

summary(trial_model)

Residuals:
       1        2        3        4        5        6 
 0.50480  0.50450  0.99131 -0.61958  0.09018 -1.47121 

Coefficients:
                      Estimate Std. Error t value Pr(>|t|)
(Intercept)             3.8425     3.3096   1.161    0.365
avg_direct_supervisor  -0.7697     0.9777  -0.787    0.514
avg_friends             0.2357     0.6660   0.354    0.757
avg_moving              0.3813     0.9426   0.405    0.725
Residual standard error: 1.423 on 2 degrees of freedom

Multiple R-squared:  0.2639,    Adjusted R-squared:  -0.8402 

F-statistic: 0.239 on 3 and 2 DF,  p-value: 0.8644
iftach s
  • 25
  • 5
  • Do you mean `rsquared`? – bird May 27 '21 at 07:07
  • r sqaured is the total explained variance for the entrie multiple regression. I am looking for each independent variable contribution to the model – iftach s May 27 '21 at 07:13
  • I believe it is already avaliable in the `lm` models in `R` – bird May 27 '21 at 07:15
  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Just asking for package recommendations is considered off topic. Describe your exact problem and if a package can help, it will be included in the answer. – MrFlick May 27 '21 at 07:18
  • it's `anova()`. https://stats.stackexchange.com/questions/79399/calculate-variance-explained-by-each-predictor-in-multiple-regression-using-r – StupidWolf May 27 '21 at 07:22
  • re Stupidwolf, as the answer says : "The percentage explained depends on the order entered. If you specify a particular order, you can compute this trivially in R (e.g. via the update and anova functions, see below), but a different order of entry would yield potentially very different answers". So my problem remains – iftach s May 27 '21 at 07:32
  • I'm voting to reopen, but it's still not totally clear what the exact question is. You've described what you're doing, but what _exactly_ do you need help fixing or finishing? – camille May 27 '21 at 16:24

0 Answers0