Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help me to solve the "varlist not allowed" error

    I run my code but it doesn't work.
    parmby “xi:ardl lnstock lngold lncoin lnoil lnrate, maxlag(2 2 2 2 2) nocons ec1 regstore(res)”, label norestore

    The system recognizes the error "varlist not allowed".
    How can I solve this problem?

    Any help is appreciated, thank you so much.
    Click image for larger version

Name:	a.png
Views:	1
Size:	8.8 KB
ID:	1683765

  • #2
    Short answer: replace the "smart quotation marks" in
    Code:
    parmby xi:ardl lnstock lngold lncoin lnoil lnrate, maxlag(2 2 2 2 2) nocons ec1 regstore(res), label norestore
    with standard programming quotation marks
    Code:
    parmby "xi:ardl lnstock lngold lncoin lnoil lnrate, maxlag(2 2 2 2 2) nocons ec1 regstore(res)", label norestore
    Long explanation:

    The parmby command is a community-contributed command from the Stata Journal, as you are asked by the Statalist FAQ to acknowledge.

    ​​​​​​​StataCorp uses – in their PDFs and in the Stata Journal – "smart quotes" rather than the standard programming quotation marks that users must type for Stata to recognize them. I suspect you copied and pasted code from the journal article to create your command.

    Users who copy too literally will have incorrect syntax. Starting in Stata 17 there is a preference setting to replace pasted curly quotes with ASCII quotes, which solves the problem for those who copy and paste from a PDF.

    Luckily the output of the help command does not suffer from this problem.

    Comment

    Working...
    X