returning p-values when using lscov function

조회 수: 3 (최근 30일)
Janis
Janis 2013년 1월 10일
댓글: Doug Rubino 2022년 10월 25일
How to return the p-values of a weighted least squares regression performed using the lscov command?

채택된 답변

Tom Lane
Tom Lane 2013년 1월 11일
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
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개)

카테고리

Help CenterFile Exchange에서 Multiple Linear Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by