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]

From |
"Steve Rothenberg" <drlead@prodigy.net.mx> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: polynomial distributed lag models error message |

Date |
Wed, 27 Oct 2010 14:02:49 -0500 |

Thank you Nick, we now no longer get the error message with "namelist". We now get the error message "c" not found r(111) It's probably the use of the double quotes as found in the SJ code, where it appears near the end of the last matrix line just before the first closing bracket: matrix 'namelist'['r','c'] = (''c'')^('r' - 1). We're systematically trying different quotes available in this Spanish keyboard around the c's in this line, so far with no luck. Could you provide the ASCII codes for the proper quotes around the first and the second c? I imagine we'll have to edit the quotes throughout the code that Allen provided in the SJ article. Steve Rothenberg >On #1 I could reproduce your problem by copying and pasting from the Stata Journal archives into Stata's do->file editor under Windows. The problem in that circumstance was that the right quotes that appear are not the >right quotes that Stata uses to denote references to local macros. You should be able to test this by comparison with the default single quote character (= Stata's right quote) and the default left quote character. I'll not elaborate because I have no idea what your keyboard looks like, but the program looks fine to me when the correct quote characters are used. Having run the first very short leg of your unequal relay race, I'll throw the baton right up in the air. Nick n.j.cox@durham.ac.uk -----Mensaje original----- De: Steve Rothenberg [mailto:drlead@prodigy.net.mx] Enviado el: Wednesday, October 27, 2010 12:38 PM Para: 'statalist@hsphsun2.harvard.edu' Asunto: polynomial distributed lag models error message We are trying to reproduce the analysis for using polynomial distributed lag models found in SJ(2004) 4, Number 2, pp. 180-189, by Allen McDowell of StataCorp. When we try to form the Vandermonde matrix using the supplied program -vandermonde-, the program returns an error message: 'namelist' invalid name r(198); The issued command is: vandermonde V, n(0/12) exactly as suggested in the article. Though we are using Stata 11.1, the program -vandermonde- is stored as an ado file with a version control statement "version 8.2", exactly as copied from the SJ article. We've tried using another name for the generated matrix instead of "V" when running the command, as we see that V is now defined in Mata as a built-in Vandermonde matrix, but we receive the same error message. We have four questions: 1. Can anyone advise us why the program -vandermonde- returns the error message? 2. Can we achieve the same results by running the Mata Vandermonde command and if so, can you provide the proper syntax to set up the matrix and then use the Mata generated matrix in the following Stata matrix manipulation commands for polynomial distributed model in the SJ article? 3. Given eventual success with working through the example in the SJ article, can we use these procedures to construct a Poisson model with distributed lags of one of the independent variables and if so, how? 4. Since Allen McDowell wrote the article as a tutorial instead of providing polished production code, does anyone know if there is newer provision for running distributed lag models in independent variables, especially models with count data dependent variables? Stephen Rothenberg Instituto Nacional de Salud Publica Cuernavaca, Mexico. * * 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/

**Follow-Ups**:**st: RE: RE: polynomial distributed lag models error message***From:*Nick Cox <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: Rolling Windows with XTregar** - Next by Date:
**st: RE: RE: polynomial distributed lag models error message** - Previous by thread:
**st: Rolling Windows with XTregar** - Next by thread:
**st: RE: RE: polynomial distributed lag models error message** - Index(es):