wald test or test of equality of means

조회 수: 3 (최근 30일)
ARS
ARS 2012년 10월 7일
Hi,
I am interested in finding a test of equality of two means (mu1=mu2). Is there any function/command in matlab through which I could run the regression:
*Wage = B1 (USD) + B2 (EURO) + e *
and find t-stats for all coefficients as well as a test of equality of means of B1 and B2 .
Please also tell if there is any GUI through which all this is manageable with a few clicks....as in EVIEWS.
Regards,
AMD.

답변 (3개)

Daniel Shub
Daniel Shub 2012년 10월 8일
No. While the MATLAB stats toolbox is powerful, it is not point and click powerful like EVIEWS or SPSS.
  댓글 수: 1
ARS
ARS 2012년 10월 8일
Hi Daniel,
So, whats the best way to do the above using matlab syntax?
Cheers AMD

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


Tom Lane
Tom Lane 2012년 10월 8일
I assume you mean you want to test the equality of two regression coefficients. This will work in the current release of the Statistics Toolbox:
USD = rand(100,1);
EURO = rand(100,1);
Wage = 10*USD - 7*EURO + randn(100,1);
lm = LinearModel.fit([USD EURO],Wage)
[p,F] = coefTest(lm,[0 1 -1])
It fits a linear regression model and displays a table with t-statistics. The last command tests whether the two slopes are coefficient, returning a p-value and F-statistic for the test. Note this includes an intercept in the model. You can remove it if you want, but that's the default.
  댓글 수: 1
ARS
ARS 2012년 10월 8일
Hi,
I am using Matlab 2011b and it given an error
""Undefined variable "LinearModel" or class "LinearModel.fit"."" What should I do now?
Please also tell that there are a few procedures like
  • nwest by Kevin shepard
  • olsnw
  • regstats2 by Oleg Komarov
  • regstats
and as you mentioned linearmodel.fit.....which one is the most reliable, I mostly have to do time series regressions and I use HAC, white standard errors....so which procedure is more flexible.
The one you mentioned is giving error.
Regards,
AMD.

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


Tom Lane
Tom Lane 2012년 10월 10일
In an older release, check out "help linhyptest". It can perform a hypothesis test on coefficients given estimates and a covariance matrix. Using regstats you can get the estimate beta and covariance matrix covb. Perhaps the other procedures will also provide these outputs.

카테고리

Help CenterFile Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by