Borrar filtros
Borrar filtros

Interpreting & checking multiple regression code & output

1 visualización (últimos 30 días)
Jen
Jen el 22 de Nov. de 2019
Respondida: Pravin Jagtap el 25 de Nov. de 2019
I have the attached matrix and need to run a multiple regression. Columns 6 & 7 represent the coefficient of variation for conditions 1 & 2 respectively (condition 1 = no cognitive loading, condition 2 = cognitive loading), and my regression DV will be value differences between the two (i.e. column 7 - column 6). My two predictors will be age (column 2) and the percentage of cognitive loading trials (column 8). I have used the following code to run the regression but I'm not sure how to check if my code & output are correct.
Matrix attached
Code:
-----------------------------------
y = (matrix(:,7) - matrix(:,6));
ones = ones(200);
age = matrix(:,2);
loadpercentage = matrix(:,8);
X = [ones age loadpercentage];
[B,BINT,R,RINT,STATS] = regress(y, X)
-----------------------------------
Output:
STATS =
0.0026 0.2526 0.7770 0.0005
-----------------------------------
If I'm interpreting this correctly, the stats relate to the following:
Rsq value = 0.0026
F value = 0.2526
P value = 0.7770
estimated error variance = 0.0005
However, I'm not entirely sure how to interperet the figures. For example, my (limited) knowledge of regression tells me Rsq value relates to how much variance is explained by the model, but is 0.0026% correct? I think also that the F and P values are telling me the overall regression is not sinificant (at 0.7770), but again I have no idea if this is because I've coded the analysis incorrectly or if the regression in this case really is not significant.
For a little background info this assignment has been set during a teaching strike so I'm feeling my way through the stats in the dark

Respuestas (1)

Pravin Jagtap
Pravin Jagtap el 25 de Nov. de 2019
Hello Jen,
Refer to following documentation for interpreting the results of ‘regress’ function:
Kind Regards
~Pravin

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by