Description Usage Arguments Value Examples
View source: R/SimpleRegressionData.R
Generates sample data for a simple regression, y = alpha + beta x + epsilon with control over var(x) and var(epsilon)
1 2 3 4 5 6 7 | SimpleRegressionData(
alpha = 1,
beta = 5,
rangex = c(0, 10),
sigma = 1,
N = 100
)
|
alpha |
intercept of regression. |
beta |
slope coefficient. |
rangex |
range of the uniform normal that will be used to generate x variables in the form c(max,min). |
sigma |
standard deviation of the error term |
N |
Number of observations |
Data.frame with Y, X and er.
1 2 3 4 | ## Not run:
SimpleRegressionData(alpha = 2, beta = -2, rangex= c(-10, 20), sigma = 3, N =100)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.