Hallo I am trying to apply the regress function in a simple x,y scatter plot but for some reason I can't find the exact syntax that will give the p-value.How is the correct syntax in order to take the p-value as an output?

댓글 수: 1

Panos Ale
Panos Ale 2017년 9월 5일
To be more specific, Ι can't understand how the input variables should be. How can I form my values in x axis into the X input?And is input y the values in y axis?

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

 채택된 답변

John D'Errico
John D'Errico 2017년 9월 5일
편집: John D'Errico 2017년 9월 5일

0 개 추천

By reading the help for regress ...
help regress
{stuff snipped away}
[B,BINT,R,RINT,STATS] = regress(Y,X) returns a vector STATS containing, in
the following order, the R-square statistic, the F statistic and p value
for the full model, and an estimate of the error variance.
So it looks like
STATS(3)
might be of interest to you.
READ THE HELP!

댓글 수: 4

Panos Ale
Panos Ale 2017년 9월 5일
편집: Panos Ale 2017년 9월 5일
I read it but I still have trouble writing the correct command...
José-Luis
José-Luis 2017년 9월 5일
편집: José-Luis 2017년 9월 5일
You are not providing sufficient detail. How exactly are you having trouble? If one were to troll, one could answer: "learn to write", "check your keyboard".
Probably more helpful would be saying: Y and X are probably not what regress expects them to be. Impossible to say with the information you have provided.
Panos Ale
Panos Ale 2017년 9월 5일
Actually the troll answers would be realistic in my case though not very helpful. I think you are right, Ι can't understand how the input variables should be. How can I form my values in x axis into the X input?And is input y the values in y axis?
Sorry for the misunderstanding, I am an amateur in Matlab!
José-Luis
José-Luis 2017년 9월 5일
You can start by trying out the examples provided in the documentation and comparing to what you actually have (and which we can't see so we can't help you there).
Otherwise provide data reproducing your problem.

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

추가 답변 (0개)

카테고리

질문:

2017년 9월 5일

댓글:

2017년 9월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by