fakeTSD | R Documentation |
Fake Data for a Time-Series
Description
This is a toy (i.e. "fake") data set created by the fabricatr
package.
There are 100 observations. The outcome y
is a linear function
of 20 + (.25 * year) + .(25 * x1) + (1 * x2) + e
. This clearly implies
some autocorrelation in the data. I.e. it's a time-series.
Usage
fakeTSD
Format
A data frame with 100 observations on the following 5 variables.
year
the year
y
an outcome
x1
a continuous variable
x2
a binary variable
e
randomly generated errors
Details
Errors are random-normal with a mean of 0 and a standard deviation of 1.
x1
is generated by a normal distribution with a mean of 5 and a standard
deviation of 2. x2
is drawn from a Bernoulli distribution with a
probability of .5 of observing a 1.