Macro to test scatterplot smoothers: ksmooth, lowess, supsmu as described in:
Modern Applied Statistics with S-Plus, 3rd Edition
W.N. Venables and B.D. Ripley
Chapter 9: Smooth Regression, Figure 9.1
Example is a set of data on 133 observations of acceleration against time for a simulated motorcycle accident, taken from Silverman (1985).
#include <fstream>
{
}
{
dir.
Append(
"/visualisation/graphs/");
while (1) {
break;
}
vC1 =
new TCanvas(
"vC1",
"Smooth Regression", 200, 10, 900, 700);
DrawSmooth(1,
"Kernel Smoother: bandwidth = 2.0",
"times",
"accel");
DrawSmooth(2,
"Kernel Smoother: bandwidth = 5.0",
"",
"");
DrawSmooth(5,
"Super Smoother: bass = 0",
"",
"");
DrawSmooth(6,
"Super Smoother: bass = 3",
"",
"");
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
A helper class to smooth TGraph.
A TGraph is an object made of two arrays X and Y with npoints each.
1-D histogram with a float per channel (see TH1 documentation)
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Append(const char *cs)
- Author
- Christian Stratowa, Vienna, Austria
Definition in file motorcycle.C.