Question

I'm using lowess to plot average cholesterol over time. Each participant had their cholesterol measured at random dates - usually not at the same time as others.

Anyway, I want the smoothed line, but I don't want the markers, especially since the markers seem to prevent scaling the y-axis from 0-500 to 0-250. Even when I go to the Graph Editor to remove the markers by hand, I still cannot rescale the y-axis.

How do I remove the markers using code only? And will doing this allow me to rescale the y-axis? Or, should I use a different command than lowess?

Was it helpful?

Solution

Graph commands have many, many, options. It's a matter of going through them very carefully using help <command> and the manual. The following graph suppresses the markers.

clear all
set more off

sysuse auto

lowess mpg weight, mean msymbol(i)

OTHER TIPS

Writing here more as a statistics user rather than a statistical programmer:

  1. Suppressing the data sounds a very bad idea, regardless of your implication that it is what you need.

  2. lowess isn't one thing: even with one implementation (Stata), there's still the question of what bandwidth was used. Note that there are several lowess (loess, locfit) algorithms around in different programs.

That said, the short answer is that twoway lowess rather than lowess does what you ask.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top