Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Queries about dfl


From   "Peter Siminski" <p.siminski@student.unsw.edu.au>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Queries about dfl
Date   Mon, 22 Oct 2007 09:49:28 +1000

Hipólito Simón had some queries on the dfl- module to estimating DiNardo,
Fortin and Lemieux Counterfactual Kernel Density (see below). I can’t speak
for the rest of the module, but I also had the problem of getting the module
to use all of my variables, which I investigated.

I think the issue is with the wordcount function, which appears as follows
in the program:
local ct=wordcount("`varlist'")

If I’m not mistaken, this function first converts the `varlist’ macro into a
string and then counts the number of words in that string. It further
appears that this string is truncated if it exceeds the string size limit (I
think 244 characters in my Stata).

I’m not an experienced Stata programmer, but the following modification
seems to fix the problem. Here, the dependent variable is entered as a
separate argument after the comma (instead of part of the varlist at the
start) and then the section with wordcount isn’t necessary.:


    syntax [varlist(default=none)] [if] [in], depvar(varname)
outcome(varname) [ group(varname) ///
        graph(string) min(real -99) max(real -99) nbins(real 200) w(real
-99) ///
        step(varlist) adaptive gauss epan oaxaca quietly nogrt(string)
probit  ///
        ylabel(string) xlabel(string) colfirst ycommon  xcommon  copies
nodraw ///
        rows(string) cols(string) holes(string) iscale(string)
iscale(string) ///
        imargin(string) name3(string) saving(string) xtitle(string)
nxvar(string) ///
        ncfactual(string) nufactual(string) nfactual(string)title(string)
subtitle(string) ///
        note(string) caption(string) t1title(string)
t2title(string)b1title(string) b2title(string) ///
        l1title(string) l2title(string) r1title(string) r2title(string)
legend(string) grtpos(string) ///
        xscale(string)]

    tempvar phat wgt x ufactual factual cfactual diff outcome2 x cfwage
cfwage2 lwage2 ///
        cfwage3 lwage3 diff_all

        local rhs `varlist'

    if ("`nxvar'"=="") {

THE LAST LINE HERE IS IDENTICAL TO THE ORIGINAL MODULE AND I DIDN’T NEED TO
CHANGE THE REST OF THE MODULE.

Peter


>________________________________________
>From   Hipólito Simón <hsimon@ua.es>
>
>To     <statalist@hsphsun2.harvard.edu>
>
>Subject      st: Queries about dfl
>Date   Wed, 22 Mar 2006 09:38:41 +0100
>________________________________________
>Dear Statalist users:
>I would really appreciate any help with a couple of issues concerning the
new dfl ssc package carried out by Pedro de Azevedo.
>First, I would like to run the package with more than 140 explanatory
variables. Yet, the logit/probit that estimates the propensity score just
>considers the first 30. Is there any way of increasing the number of
variables?
>Second, I would like to estimate some characteristics (mean, deciles or
even inequality measures) of the counterfactual estimated density. Is it
>possible with the dfl package?
>Thanks in advance.
>Hipolito Simon
>University of Alicante



Peter Siminski
PhD Student
School of Economics / Social Policy Research Centre (SPRC)
University of New South Wales



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index