XLatexIt! run report...
*** Found expression $\beta$
Am 19.11.2013 22:20, schrieb Riccardo (Jack) Lucchetti:
On Tue, 19 Nov 2013, Pindar wrote:

I wonder that here nobody else seems to be interested in estimating such models. They should fit to a number of different applications.

I am. But I have a bazillion other things to do at the moment.

For a start I managed to program a Poisson FE Permant Scaling Factor Model.
As theory tells the $\beta$ are identical to the Poisson model including unit dummies!

<hansl>
open "rac3d.gdt" -q

smpl 4800 --random
# construction of panel
matrix mTime = seq(2001,2004)'
series time = ones(1200,1)**mTime
matrix units = seq(1,1200)'
series pid =  units**ones(rows(uniq(time)),1)
delete SEX AGE AGESQ LEVYPLUS FREEPOOR FREEREPA
store "rac3d_Panel.gdt"
open "rac3d_Panel.gdt" -q
setobs pid time --panel-vars

DVISITS += randgen(P,2)
smpl full
genr unitdum
list uDums = du_*
smpl pid<=350 --res --rep --bal # in order to estimate with the poisson command

list X = HSCORE HOSPADMI
series y = DVISITS

poisson y const X uDums -q
eval $coeff[2:(1+nelem(X))]

# Initial OLS Fixed Effects to get starting values for the coefficients
series fake_y = ln(y+1)
panel fake_y const X uDums -q
matrix b = ($coeff[2:(1+nelem(X))] .< 0 ) ? 0 : ($coeff[2:(1+nelem(X))])
matrix mX = {X}'
series v = NA

"Poisson FE" <- \
mle loglik = y*ln(exp(Xb)*v) - exp(Xb)*v
    series Xb = mX'b
    series v = pmean(y)/pmean(exp(Xb))
    series e = y - v*exp(Xb)
    deriv b = e .* mX'
end mle --hessian
<hansl>
-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Università Politecnica delle Marche
  (formerly known as Università di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------


_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users