OLS regression

  • Follow


Hi,

I try to estimate the OLS by 

results=ols(y,[ones(T,1) x]);  

It wont work n i dont know why, I defined T, y, x and the equation.

Matlab tells me

??? Undefined function or method 'ols' for input arguments of type 'double'.

Error in ==> Monte_Carlo at 16
results=ols(y,[ones(T,1) x]);

And i dont understand what it mean type double.
I would be very happy if somebody could help me.

Thanks 
0
Reply Carlotta 5/18/2010 4:24:04 PM

"Carlotta Schuster" <schuster.carlotta@googlemail.com> wrote in message <hsuev4$500$1@fred.mathworks.com>...
> Hi,
> 
> I try to estimate the OLS by 
> 
> results=ols(y,[ones(T,1) x]);  
> 
> It wont work n i dont know why, I defined T, y, x and the equation.
> 
> Matlab tells me
> 
> ??? Undefined function or method 'ols' for input arguments of type 'double'.
> 
> Error in ==> Monte_Carlo at 16
> results=ols(y,[ones(T,1) x]);
> 
> And i dont understand what it mean type double.
> I would be very happy if somebody could help me.
> 
> Thanks 

Hi, that error means that Matlab does not know where the function ols.m is. The type 'double' is just telling you that you tried to input something of class double to ols(). Make sure wherever ols.m is on your machine that that directory (folder) is in your Matlab path.

Wayne
0
Reply Wayne 5/18/2010 4:39:04 PM


"Wayne King" <wmkingty@gmail.com> wrote in message <hsufr8$2qh$1@fred.mathworks.com>...
> "Carlotta Schuster" <schuster.carlotta@googlemail.com> wrote in message <hsuev4$500$1@fred.mathworks.com>...
> > Hi,
> > 
> > I try to estimate the OLS by 
> > 
> > results=ols(y,[ones(T,1) x]);  
> > 
> > It wont work n i dont know why, I defined T, y, x and the equation.
> > 
> > Matlab tells me
> > 
> > ??? Undefined function or method 'ols' for input arguments of type 'double'.
> > 
> > Error in ==> Monte_Carlo at 16
> > results=ols(y,[ones(T,1) x]);
> > 
> > And i dont understand what it mean type double.
> > I would be very happy if somebody could help me.
> > 
> > Thanks 
> 
> Hi, that error means that Matlab does not know where the function ols.m is. The type 'double' is just telling you that you tried to input something of class double to ols(). Make sure wherever ols.m is on your machine that that directory (folder) is in your Matlab path.
> 
> Wayne

Thank you, Wayne! 
0
Reply Carlotta 5/21/2010 1:31:07 PM

2 Replies
576 Views

(page loaded in 0.033 seconds)

Similiar Articles:













7/23/2012 6:26:05 AM


Reply: