0
$\begingroup$

I would like, if possible, to calculate the residuals of lm, with the data output by t.test. How could this be done?

This is the data from t.test:

    Two Sample t-test

data:  rta[ind1] and rta[ind2]
t = 0.68184, df = 15, p-value = 0.5057
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -6.286913 12.201198
sample estimates:
mean of x mean of y 
 25.85714  22.90000 

And I have the following coefficients in lm:

Residuals:
     Min       1Q   Median       3Q      Max 
-12.9000  -6.9000  -0.8571   5.1000  17.1429 
$\endgroup$
3
  • $\begingroup$ What predictor variables does your model include? Also, what are the two groups you are comparing based on these residuals? $\endgroup$ Commented Nov 17, 2019 at 23:38
  • $\begingroup$ Hi @IsabellaGhement, I am using only one predictor variable, and I only have these data I don't have the used values to calculate this is for this reason that I am searching if is possible a way of get it with only this data. $\endgroup$
    – Tlaloc-ES
    Commented Nov 17, 2019 at 23:58
  • $\begingroup$ Do you mean to recover all of the deviations from the predicted value, one residual for each of your points? (This would be equivalent to being able to recover the original data, since you have the predictions from the regression equation.) $\endgroup$
    – Dave
    Commented Nov 18, 2019 at 1:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.