Page 1 of 1

Different result with P(1-P) and P*(1-P)

Posted: Tue May 16, 2023 10:24 pm
by jesusconjota
Good evening, dear friends. A query: I am developing Logit clustered, and one section involves using weighted least squares where the following weight w is used for the following expression:
Zi/root_w = 1/root_w + beta*Xi/root_w + ui/root_w
Where w=1/(Nro_families * P(1-P)

For the effect I need to generate root_w with the following instruction:

(1) Genr raiz_w = @sqrt(1/(Nro_families*P(1-P))))

However, if the instruction is:

(2) Genr root_w = @sqrt(1/(Nro_families*P*(1-P))))

The result is different.

Note that the difference between equations (1) and (2) is that in the first case I use P(1-P) and in the second case P*(1-P).

I do not know why using the * produces a different result.

Re: Different result with P(1-P) and P*(1-P)

Posted: Wed May 17, 2023 8:37 am
by EViews Gareth
One is doing a multiplication. The other is using the lag operator.

Re: Different result with P(1-P) and P*(1-P)

Posted: Wed May 17, 2023 4:09 pm
by jesusconjota
Sorry for the question, I did not understand the lag operator, if it is in equation 1 or in equation 2: In both cases is not P being multiplied by (1-P)?

Re: Different result with P(1-P) and P*(1-P)

Posted: Wed May 17, 2023 6:21 pm
by startz

Code: Select all

P(1-P)


means P lagged 1-P periods, not multiplication.