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()
How toI have quite a simple problem. But STATA is new to me. my code is : y age gender: egen UIdur_mean …
Question about using if flag + tab togetherHi all, I am trying to create a Table 1 using Medicare claims to compare demographics among people …
Graph combine formattingDear All, I am trying to combine coefficient plots from 3 different regressions. My data looks as f…
Counting unique observations in a complicated data structureDear Statalist, I have a panel data on the level of towns and their administrative parts. Each town…
Trouble plotting standard deviation - Sigma convergenceHi, I am new to Stata and have been trying to plot the standard deviation of my whole sample and th…
Subscribe to:
Post Comments (Atom)
0 Response to question about sparkline with by() and over()
Post a Comment