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 |
Nick Cox <n.j.cox@durham.ac.uk> |

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

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

Date |
Wed, 27 Oct 2010 20:16:09 +0100 |

This is just the same problem. First off, those are not double quotes. Those are nested single quotes. Stata certainly has an idea of double quotes but they are single key characters, as in "Stata is beautifully simple and logical, despite any and all appearances to the contrary". The left and right quotes must be distinctive for local macro references in Stata. If the syntax were otherwise, Stata would have no way of disambiguating e.g. 'a'c'd'. Is that local macro a followed by plain c followed by local macro d or is it a reference to local macro c embedded within other stuff? (NB this is _not_ Stata syntax.) Your left and right quotes are identical and Stata thus has no idea what ''c'' means. You want ``c''. Using -asciiplot- (SSC), a splendid user-written program rich in characterisation _and_ plot (*), I make that ` (ASCII 96) and ' (ASCII 39). Nick n.j.cox@durham.ac.uk (*) My best joke today. Steve Rothenberg 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 Nick Cox 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. Steve Rothenberg [mailto:drlead@prodigy.net.mx] 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? * * 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/

**References**:**st: RE: polynomial distributed lag models error message***From:*"Steve Rothenberg" <drlead@prodigy.net.mx>

- Prev by Date:
**st: RE: polynomial distributed lag models error message** - Next by Date:
**st: Bayesian VARs** - Previous by thread:
**st: RE: polynomial distributed lag models error message** - Next by thread:
**st: RE: polynomial distributed lag models error message** - Index(es):