Description Usage Arguments Details Value Author(s) See Also Examples
Generates data from a k-variable linear regression model.
1 | gendat_linreg(n, beta, rFUN_X = rnorm, rFUN_y = rnorm, X_args, y_args)
|
n |
Sample size. |
beta |
k \times 1 vector of k regression parameters. |
rFUN_X |
The distribution function
used to generate values of \mathbf{X}.
The default value is |
rFUN_y |
The distribution function
used to generate values of the residuals ε.
The default value is |
X_args |
List of arguments
to pass to |
y_args |
List of arguments
to pass to |
Randomly generates the data matrix
\mathbf{X}
and the regressand data
\mathbf{y}
using specified population parameters defined by
\mathbf{y}_{n \times 1}
=
\mathbf{X}_{n \times k}
\boldsymbol{β}_{k \times 1} +
\boldsymbol{ε}_{n \times 1}.
Refer to gendat_linreg_X
on how \mathbf{X} is generated
and gendat_linreg_y
on how \mathbf{y} is generated.
Returns a list with two elements X
and y
.
X
is the data matrix,
that is an n \times k matrix
of n observations of k regressors,
which includes a regressor whose value is 1 for each observation.
y
n \times 1 vector of observations on the regressand.
Ivan Jacob Agaloos Pesigan
Other data generating functions:
gendat_linreg_X()
,
gendat_linreg_y()
,
gendat_mvn_a()
,
gendat_mvn_fe()
,
gendat_mvn()
,
gendat_vm()
,
gendat()
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.