returning p-values when using lscov function

How to return the p-values of a weighted least squares regression performed using the lscov command?

 採用された回答

Tom Lane
Tom Lane 2013 年 1 月 11 日

0 投票

If you want p-values for each coefficient, then t is the coefficient estimate divided by its standard error (both returned by lscov), and the p-value is 2*tcdf(t,df), and df=length(b)-length(x) using the notation in the reference page.

3 件のコメント

Janis
Janis 2013 年 1 月 11 日
編集済み: Janis 2013 年 1 月 11 日
Thank you! Is there a command for returning the r-squared, as is the case using robustfit, or must it also be calculated?
Tom Lane
Tom Lane 2013 年 1 月 14 日
lscov does not return R-square, so you'd have to calculate it yourself. You'd probably want to compute the various sums of squares including the weights in those formulas.
Doug Rubino
Doug Rubino 2022 年 10 月 25 日
I'm having trouble understanding this term: 2*tcdf(t,df)
tcdf is a cumulative distribution function so it has a range of [0 1]. Doesn't this mean the p-value has a range of [0 2]?

サインインしてコメントする。

その他の回答 (0 件)

タグ

質問済み:

2013 年 1 月 10 日

コメント済み:

2022 年 10 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by