Description Usage Arguments Value Author(s) Examples
Simulates n observations, (y, x) from a simple linear regression, y = a+b*x+e, where x is uniformly distributed on (0, n), e are normally distributed with mean 0 and variance 1. The parameeters a and b are zero. The error term is not independent but has an exponential correlation with parameter r so that observations close together in the x-space are positively correlated. When r=0, the correlation is zero but as r increases the correlation gets stronger.
1 | simer(n, r)
|
n |
number of observations |
r |
correlation parameter |
A data frame with components:
x |
input variable |
y |
output variable |
A. I. McLeod and Yun Shi
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.