Multivariate Regression Test Statistics
1 次查看(过去 30 天)
显示 更早的评论
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
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))
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!