Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Svyselmlog / Predict Values


From   "Joao Ricardo F. Lima" <[email protected]>
To   [email protected]
Subject   Re: st: Svyselmlog / Predict Values
Date   Tue, 17 Jul 2012 16:11:49 -0300

Hi Ana,

sorry for the delay. Try:


*********************************begin
example******************************************
gen cons = 1

cap program drop selnoboot
program define selnoboot
            local vars "exp exp2 fundamental medio superior branco
female NORTE CENTOES SE SUL"
            local vardepsel "exp exp2 fundamental medio superior
branco female NORTE CENTOES SE SUL chefe allincsources filho idoso"
            cap drop singletonr
            qui svyselmlog `1' `vars', sel (setgeral `vars'
`vardepsel') force meth(dmf2) mloptions(base(0)) gen(dmf`2')
showmlogit
            mkmat `vars' dmf`2'* cons, matrix(var_ind1)
            matrix B1 = e(b)
            matrix y_hat1 = var_ind1*B1'
            svmat y_hat1, names(`1'_est)
end

selnoboot lnwhpad pad
****************************************************end*************************************************

I updated my Stata and it´s running with my data.

HTH,

Joao Lima

2012/7/11 Ana <[email protected]>
>
> Dear Stata users,
>
> I am trying to estimate the wage equations of public and private
> sector, while considering the selection that involves the choice of
> non-working versus working at public sector versus working at private
> sector. I’m following the Bourguignon, Fournier and Gurgand (2004)
> model. I’m using the svyselmlog routine (‘selectivity-adjusted
> equation based in the multinomial logit for survey data’).
>
> I need to have the predict values of both wage equations (predicted
> public sector wage and predicted private wage). And that is the
> problem I am facing: I can´t get my predicted values (based on all
> regressors,  the dependent variables and  the inverse mills ratio as
> well).
>
> Here is the routine:
>
> gen cons = 1
> #d ;
> svyselmlog lnwhpad exp exp2 fundamental medio superior branco female
> NORTE CENTOES SE SUL,select(setgeral exp exp2 fundamental medio
> superior branco female NORTE CENTOES SE SUL chefe allincsources filho
> idoso)  meth(dmf2)  gen(dmfhpad) force showmlogit;
> #d cr
> **************
> *************
> mkmat   exp exp2 fundamental medio superior branco female NORTE
> CENTOES SE SUL dmfhpad* cons, matrix(var_rhs)
> matrix Bhpad = e(b)
> matrix lnwhpad_hat = var_rhs*Bhpad
> svmat lnwhpad_hat, names(lnwhpad_predito)
>  *************
>
> The Stata’s answer:
>
> **************
> mkmat   exp exp2 fundamental medio superior branco female NORTE
> CENTOES SE SUL dmfhpad* cons, matrix(var_rhs)
> variable dmfhpad* not found
>  r(111);
> *************
>
> Can anyone help me?
> Best regards,
> Ana.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/




--
---------------------------------------------------------
João Ricardo F. de Lima
Pesquisador A - Economia Aplicada
Embrapa Semiárido
e-mail: [email protected]
fone: +55 (87) 3866-3667
home-page: www.cpatsa.embrapa.br
----------------------------------------------------------

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index