Help getting p-values of individual beta coefficients as output from mvregress

1 回表示 (過去 30 日間)
Prabhjot Dhami
Prabhjot Dhami 2020 年 12 月 4 日
回答済み: Shraddha Jain 2020 年 12 月 22 日
Greetings,
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:
  1. Have I calculated the t-values correctly
  2. 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?
Thank you.

回答 (1 件)

Shraddha Jain
Shraddha Jain 2020 年 12 月 22 日
Hi Prabhjot,
As per my understanding, t-value is negative when the regression coefficient is negative. A possible workaround for calculating t-values and p-values from multivariate regression coefficients is provided in a similar question. Refer to this link.
Hope this helps!

カテゴリ

Help Center および File ExchangeTransaction Cost Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by