gauravbhatti wrote:
I have a data frame with 25000 rows containing two columns Time and Distance.
When I plot a simple distance versus time plot, the plot is very confusing
showing no general trend because of the large data. Is there any way I can
improve the plot by lets say using moving average as in EXCEL ? please also
suggest some other methods to make the graph smoother and better looking.
Gaurav
I recommend using the quantreg package to fit a quantile regression
model using a spline function of Time. Draw the estimated curves for
selected quantiles such as 0.1 0.25 0.5 0.75 0.9. A new function Rq in
the Design package makes this easier but you can do it with just quantreg.
Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.