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: nnmatch error in PSM


From   Katherine Picho <[email protected]>
To   [email protected]
Subject   Re: st: nnmatch error in PSM
Date   Thu, 12 Sep 2013 13:30:28 -0400

Hi Ariel

Im only 2 days new to the stata list (& still familiarizing myself
with the etiquette) so if my reference to stata as 'STATA' proved
offensive to you and everyone else on the listserv, I apologize. your
correction is duly noted.

I am using stata12 IC, and I obtained nnmatch by  typing ssc install
nnmatch in stata 12.

thank you for your recommendations and for the link above. I will take
 a look and follow your leads.

Best,

On Thu, Sep 12, 2013 at 11:20 AM, Ariel Linden, DrPH
<[email protected]> wrote:
> Katherine,
>
> Posters to the Statalist are asked to indicate which program they are using
> and where they got it from. In this case, you reference –nnmatch- which is a
> user written program found at http://www.stata-journal.com/software/sj4-3.
>
> This is not intended to be an academic exercise or “busy-work”. In fact, it
> serves an important purpose. In Stata v13, there is a built-in program -
> teffects nnmatch- that is based on the original –nnmatch- but with some
> differences. Thus, others on this list have no idea which of these programs
> you are referring to (let alone that you did not indicate which version of
> Stata you are using (other than stating IC).
>
> Moreover, as a note of reference, it is “Stata” not “STATA”.
>
> As to your problem, you should review your memory settings. In Stata v13,
> the settings are as follows (they are slightly different than in prior
> versions):
>
> set maxvar      #   [, permanently]
> set niceness    #   [, permanently]
> set min_memory  amt [, permanently]
> set max_memory  amt [, permanently]
> set segmentsize amt [, permanently]
>
> As for –psmatch2- (http://fmwww.bc.edu/RePEc/bocode/p), it can indeed
> perform matching with and without replacement. Note that –nnmatch- performs
> variable matching whereas –psmatch2- will allow you to perform both variable
> matching and propensity score matching.
>
> I hope this helps
>
> Ariel
>
> Date: Wed, 11 Sep 2013 10:25:25 -0400
> From: Katherine Picho <[email protected]>
> Subject: st: nnmatch error in PSM
>
> Hi all
>
> I'm currently attempting propensity score matching with nearest
> neighbor using the nnmatch.
>
> However, at some point in running my ado file, STATA returns an error
> message: "Insufficient memory to create more variables:Either increase
> memory or decrease m"
>
> I only have about 290 variables in the current dataset (21k observations).
> I'm only matching using 3 variables. I'm using STATA IC and the max #
> var is 2048 (which is way more that I could ever use for this specific
> purpose).
>
> Even when I reduce the dataset to only 40 variables, and still match
> on the 3 variables of interest, the problem/ error code remains the
> same.
> I have 3615 treatment observations that I'd like to match from a pool
> of about 16,500 controls (so theoretically this should not be a
> problem)
> My matching variables are categorical
>
> the nnmatch command that I run (where I run into trouble) is:
>
> nnmatch Depvar trtmt pscore, tc(att) m(1) keep(matched_att) replace
>
> this is where it generates the error message.
>
> I tried to remedy potential memory problems like- compressing the
> data/ variables. expanding the memory. (help query, within stata
> itself), etc, Nothing works. A search on the statalist archives
> indicates that a few people have run into the same problems using
> nnmatch-- but none of the queries I found had received any responses
> on how to fix the problem.
>
> If anyone here has run into a similar issue that they were able to
> fix, please let me know. Thanks!
>
> Katherine
> *
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

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


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