I am trying to get the individual p-values of my beta coefficients which are output from mvregress.
This is my current code:
[beta, Sigma, E, CovV, logL] = mvregress(X,Y)
Errors = sqrt(diag(covB));
t_values = beta ./ reshape(Errors, size(beta,1), size(beta,2));
pVal = 1 - tcdf(t_values, length(X) -1);
My concerns are:
- Have I calculated the t-values correctly
- I have a negative t-value of -3.2337, which should lead to a p-value of less than 0.05. However, the resulting value I get is 0.9984. Do I have to include the absolute values of my t-values as input?