Curious
Posts:
1,995
Registered:
12/6/04


Re: undefined independent variable x
Posted:
May 20, 2013 11:09 AM


"Kam Hoi" wrote in message <knd7h7$cq3$1@newscl01ah.mathworks.com>... > When i type the followings > function [b, CI, R, Yhat_CI, e]=OSL_robust (X, Y, significance) > b=inv(X'*X)*(X'*Y) > cov=inv(X'*X)*(X'*diag(e^2)*X)*inv(X'*X) > se=(diag(cov))^0.5 > t=b./se > p=2*(1cdf('norm',abs(t),0,1)) > R2c=1(((e'*e)/T)/var(Y,1)) > R2u=1((e'*e)/Y'*Y) > AR2c=1((1/TK1)*e'*e)*(var(Y)) > AR2u=1((1/TK)*e'*e)/((Y'*Y)/T) > CIU=(b+1.96*se) > CIL=(b+1.96*se) > Yhat=Xb > Yhat_CI=[X*CIU,X*CIL] > e=YYhat > > > It comes out that > ??? Input argument "X" is undefined. > > Error in ==> OSL_robust at 2 > b=inv(X'*X)*(X'*Y) > > i am instructed to know that x independent variable X is (T by (K=1)) > I am a beginner of matlab, hope anyone can help me~~ Thx
How do you call OSL_robust?
Do you do somethiong like:
[b, CI, R, Yhat_CI, e]=OSL_robust (X, Y, significance)

