필터 지우기
필터 지우기

Is the pvalue from an lmfit table derived from a two-sided or one-sided t-test?

조회 수: 2 (최근 30일)
I am using the lmfit to do a linear regression analysis between independent variable x and its relationship with the dependent variable y. The output of this simple model looks like:
y ~ 1 + x1
After using lmfit on the data for x and y variables, a table providing the t-statistic and the associated p-value are given for variable x1.
My question is, does the p-value in this table automatically account for a two-tailed test or does the p-value need to be doubled to account for this? According to the MATHWORKS page, the pvalue for the t-statistic is for a two-sided hypothesis test, so it leads me to believe that the p-value that is reported in the table does not need to be doubled and is already taken into account in the calculation. And if that is true, if you wanted to do a one-sided hypothesis test based on this p-value, you should halve the p-value to get your answer. Could anyone verify these questions/assumptions?
Here is my source on MATHWORKS about lmfit being a two-sided hypothesis test: https://www.mathworks.com/help/stats/fitlm.html#mw_11b75ad7-ce2d-4251-9e8f-2b70dbfe4f4d
Thanks so much!

채택된 답변

Star Strider
Star Strider 2024년 5월 23일
For what it’s worth, when I updated my polyparci function, I used a default two-sided t-distribution to calculate the probabilities, and used fitlm to verify my probability results. It is two-sided.
That is the only sort of verificiation I can provide.
  댓글 수: 4
William
William 2024년 5월 23일
Thank you so much, I just saw your page for that function! Appreciate it and already testing it on my data.
Star Strider
Star Strider 2024년 5월 23일
As always, my pleasure!
It has a friend polypredci that calculates the confidence intervals on the fit, if you need to do that as well.
Please.let me know if you have any comments or concerns about any of them.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by