![]() |
![]() |
Search DSS Finding Data Analyzing Data Citing data About Us DSS lab consultation schedule (Monday-Friday)
*No appts. necessary during walk-in hrs. Note: the DSS lab is open as long as Firestone is open, no appointments necessary to use the lab computers for your own analysis. ![]() ![]() |
Home GraphicsSplus has a powerful graphics environment. Before you can begin to plot things in Splus, you need to open a graphics device. Opening a graphics device is as simple as typing the name of the device and open and close parentheses. Three graphical devices that Splus can use on an X-windows machine include: motif(), X11(), and openlook(). Now type,
A new big graphics output window should open. We will only barely scratch the surface of graphics for now, but this list provides a basic introduction to several types.
PlotThe most important of these graphics tools we will deal with today is plot(). Here is the syntax of a basic plotting command (with a couple added perks):
Adding lines: abline() and lowess() smoothingYou can look graphically represent the fit of your model graphically using the abline() command. This command allows you to plot a fitted line through a plot of points. For example, if you have a model with one dependent and one independent variable, you can use it to look visually at how well the model fits the data.3. Building on the graph we just made, lets use the abline line command.
That's all there is to it. You should note that we can only do this simple function with a bivariate regression. Multiple variables make a single two-dimensional plot impossible. The second additional line you can add is a smoothed line, one that conforms more exactly to the data than the simple abline(). We'll use a smoother called lowess(). A lowess smoother uses "robust local linear fits" - several regressions, each within a particular window.
To activate this we will need the following commands:
|