The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: undefined independent variable x
Replies: 2   Last Post: May 20, 2013 11:09 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 2,359
Registered: 12/6/04
Re: undefined independent variable x
Posted: May 20, 2013 11:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Kam Hoi" wrote in message <knd7h7$cq3$>...
> 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*(1-cdf('norm',abs(t),0,1))
> R2c=1-(((e'*e)/T)/var(Y,1))
> R2u=1-((e'*e)/Y'*Y)
> AR2c=1-((1/T-K-1)*e'*e)*(var(Y))
> AR2u=1-((1/T-K)*e'*e)/((Y'*Y)/T)
> CIU=(b+1.96*se)
> CIL=(b+1.96*se)
> Yhat=Xb
> Yhat_CI=[X*CIU,X*CIL]
> e=Y-Yhat
> 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)

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.