From: Natasha on
Hello Everyone,

I am a Stata user. However for my thesis I need to implement a Matlab coded program.

I need to implement the threshold estimation by Hansen (1999) (Threshold effects in non-dynamic panels: Estimation, testing and inference in Journal of Econometrics 93 (1999) 345-368)

For similar reasons I need to know a bit on what is happening in the program given by Hansen (1999) so as to edit the given program to suit my data. Although I have made some progress, I am still facing few error problems.

I was wondering if someone could help me with the same?

Thanks
Natasha
From: Wayne King on
"Natasha " <lexna5(a)nottigham.ac.uk> wrote in message <hkuht4$3gj$1(a)fred.mathworks.com>...
> Hello Everyone,
>
> I am a Stata user. However for my thesis I need to implement a Matlab coded program.
>
> I need to implement the threshold estimation by Hansen (1999) (Threshold effects in non-dynamic panels: Estimation, testing and inference in Journal of Econometrics 93 (1999) 345-368)
>
> For similar reasons I need to know a bit on what is happening in the program given by Hansen (1999) so as to edit the given program to suit my data. Although I have made some progress, I am still facing few error problems.
>
> I was wondering if someone could help me with the same?
>
> Thanks
> Natasha

Hi Natasha, I think you should provide the relevant details, especially the error messages you are receiving. You don't have to provide all the code, but you should include things like: what are the classes and sizes of your inputs, exactly what error message you are getting, etc.
Wayne
From: Natasha on

Hi there,

The model given by Hansen (1999) includes lagged values and the model which am using is a static model. So when I remove the lagged items from the m.file, I get a warning of

"Warning: Rank deficient, rank = 3, tol = 2.7702e-010.
> In THRESH_P>sse_calc at 169
In THRESH_P>thr_sse at 212
In THRESH_P>model at 293
In THRESH_P at 112"

I understand the 'in THRESH_P' part.

What I do not understand is the rank deficient and how do I got about it

Thanks
Natasha
From: Wayne King on
"Natasha " <lexna5(a)nottigham.ac.uk> wrote in message <hkujun$iai$1(a)fred.mathworks.com>...
>
> Hi there,
>
> The model given by Hansen (1999) includes lagged values and the model which am using is a static model. So when I remove the lagged items from the m.file, I get a warning of
>
> "Warning: Rank deficient, rank = 3, tol = 2.7702e-010.
> > In THRESH_P>sse_calc at 169
> In THRESH_P>thr_sse at 212
> In THRESH_P>model at 293
> In THRESH_P at 112"
>
> I understand the 'in THRESH_P' part.
>
> What I do not understand is the rank deficient and how do I got about it
>
> Thanks
> Natasha

Hi Natasha, I don't have that code, but if you look at line 169 in sse_calc you will probably see some matrix division operation. In that operation you are using a nonsquare (rectangular) matrix that is rank deficient. For example:

A = [1 2; 2 4; 3 6];
B = ones(3,2);
B/A

You'll produce a similar error message with the above and you'll see that the rank of A
rank(A) is given in the error message.
Hope that helps,
Wayne
From: Natasha on

Thanks Wayne.

The sse code in line 169 looks like

function ss=sse_calc(y,x)
e=y-x*(y'/x')';
ss=e'*e;

Thanks
Natasha
 |  Next  |  Last
Pages: 1 2
Prev: griddata - NaN
Next: Help, Fsk and Bpsk.