Description Usage Arguments Examples
This function takes user inputs, creates a data frame, fits a linear model, and plots the output. The function can take 4 optional arguments that adjust the relationship between x and y. The purpose of this function is to help teach the linear model.
1 2 3 4 5 6 7 8 9 |
n |
Number of observations |
intercept |
The y-intercept |
slope |
The slope the line |
sigma |
Spread around the mean |
custAxis |
Logical. Set to true to use custom xlim/ylim |
xlim |
Vector for x axis, 'custAxis' must be TRUE. |
ylim |
Vector for y axis, 'custAxis' must be TRUE. |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.