With great delight, I was reviewing some of Nick Cox's presentations and notes on data visualization with Stata and have been experimenting with sparkline this morning.
The structure of my dataset is as follows: panel data on >100 farm fields, each of which has 8 strips (4 treatment and 4 control strips). In hopes of comparing treatment and control trends for each farm, I used the following code structure:
sparkline y year if (var1==1 | var2==1) & (var3=="AMS" | var3=="Control") & var4=="z", over(var3) by(field) extremes
The sparklines produced also have a vertical bar in each time period where the outcome variable is observed that seems to represent the range of y over the 4 Treatment and 4 Control strips in each time period (based upon adding the extremes option). However, my question is, how are the starting and ending point for the sparkline determined with the scaling defaults?
I've included a scrubbed example of the corresponding visual.
Array
Thanks.
Maria
Related Posts with question about sparkline with by() and over()
Three way interaction marginsplot?Hi all I am running a threeway interaction model using mixed and was wondering how best to go about …
Multilevel - Mixed-Effects Model SpecificationDear Collegues I would like to ask your help to correctly run the code for a multilevel approach. …
About Random Survival Forest Analysis using Stata Good morning at the Stata Forum! Random Survival Forest is specifically suitable for exploratory an…
Importing several csv files in stata at onceHi! I have a lot of csv files that I would like to import to stata the easiest way possible. Is it p…
Binary Variable for all years in panel dataHello, I will preface by saying the data i am using is confidential so i cannot share the whole file…
Subscribe to:
Post Comments (Atom)
0 Response to question about sparkline with by() and over()
Post a Comment