stata-joyplot icon indicating copy to clipboard operation
stata-joyplot copied to clipboard

joyplot error -invalid syntax -- update to fix `levelsof` not returning `r(r)` in older Stata versions.

Open Stata-ww opened this issue 1 year ago • 6 comments

use "OWID_data.dta", clear

. . keep if group10==1 (131,816 observations deleted)

. . keep country date new_cases

. . joyplot new_cases date if date > 22460, over(country) invalid syntax

Stata-ww avatar Apr 09 '23 03:04 Stata-ww

I just checked and it's working fine. I would suggest updating the packages:

ssc install joyplot, replace
ssc install palettes, replace
ssc install colrspace, replace

and try again.

asjadnaqvi avatar Apr 09 '23 07:04 asjadnaqvi

Still reporting an error.

Stata-ww avatar Apr 09 '23 08:04 Stata-ww

Which Stata version? and when you type which joyplot does it say v1.61?

asjadnaqvi avatar Apr 09 '23 09:04 asjadnaqvi

stata15

which joyplot.ado E:\stata\stata15/ado\myplus\j\joyplot.ado *! Joyplot v1.61 (01 Mar 2023) *! Asjad Naqvi ([email protected])

Stata-ww avatar Apr 09 '23 09:04 Stata-ww

I've found the reason: levelsof in joyplot.ado is the latest version, but I'm an older version and won't return the staging: r(r). I added "qui tab `over'" in joyplot.ado and it was up and running. Thank you for your reply. My English is not very good, there are some small mistakes in the reply, please forgive me. thank you。3Q。

Stata-ww avatar Apr 09 '23 10:04 Stata-ww

Thank you so much for finding this! I didn't realize that levelsof didn't return r(r) in older versions. This is a major issue for backward compatibility in most of the packages that I will fix over time.

asjadnaqvi avatar Apr 09 '23 11:04 asjadnaqvi