Multivariate Regression Test Statistics
이전 댓글 표시
I have designed a multivariate regression with two response (Y) and three predictor (X) variables using mvregress. The response variables are horizontal and vertical eye position (h, v) and the predictor variables are a constant term with horizontal and vertical gaze position (x, y). How do I compute a p-value for each of my coefficients given what the function returns?
% multivariate regression
n = numX * numY; % number of gaze positions
d = 2; % number of response variables
numCoeffs = d * 2 + d;
X0 = ones(n, 1);
X1 = XX(:);
X2 = YY(:);
X = [X0, X1, X2]
Y1 = H;
Y2 = V;
Y = [Y1, Y2];
% coefficients, covariance matrix, residuals, variance of parameters, loglikelihood value, correlation matrix
[B, S, R, V, L] = mvregress(X, Y);
predY = X * B;
C = corrcov(S);
E = sqrt(diag(V));
댓글 수: 4
dpb
2021년 2월 13일
The standard errors for the regression coefficients are the square root of the diagonal of the variance-covariance matrix, V.
se = sqrt(diag(V))
The lack of formalized output tables similar to SAS or other statistics packages is a real weakness in using MATLAB Statstics Toolbox for routine stastitical analysis. Having to do all the rest of the work is just something that users should not have to spend their time having to do -- should have all been pre-packaged, at least as options to prepare the ANOVA tables, etc., etc., ...
It's occasionally useful in repetitive situations to have coefficients and models that can be manipulated programmatically, granted, but that, in general, is not the most desired output in a typical application.
$0.02, imo, ymmv, etc., etc., etc., ...
Kevin Willeford
2021년 2월 13일
dpb
2021년 2월 13일
Yeah, same as for OLS, if you ran a separate OLS regression for each outcome variable you would get the same coefficients, standard errors, t- and p-values, and confidence intervals.
So, for each b,
t=b/SE;
p>|t| --> 2*(1-tcdf(t,dof))
Kevin Willeford
2021년 2월 15일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Predictive Coding에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!