Description Usage Arguments Details Value Note Author(s) See Also Examples
rvg4yx
generates random variates of a response
variable under the given conditions of mean and
variance-covariance structure of matrices of predictors
and their coefficients.
1 2 3 |
N |
a number of random variates |
pars |
a vector of regression parameters |
ztrunc |
FALSE by default |
xreg |
FALSE by default |
seed |
NULL a random seed |
shape |
a shape parameter of gamma distribution |
... |
other arguments |
kind |
types of random variates |
center.X |
Are predictors centered at their means? |
The mean parameter of a response variable is a function of linear predictor by a link function in the context of generalized linear models.
Log and logit links are supported.
Default to Xstr
is an independent multivariate
normal distribution with mean Xmean
, correlation
R
, and standard deviation Xsd
.
a list with components
n |
the number of observations which are actually realized |
y |
the
|
X |
the |
yX |
the |
Default to a matrix decomposition method
is
eigen
. Other options are chol
and
svd
.
Currently, the link logit
is not supported.
Chel Hee Lee <gnustats@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
tmp <- rvg4yx(N=5e2, pars=c(0.5, -0.5), ztrunc=TRUE, xreg=TRUE, kind="mvnorm", mean=xm, sigma=xsigma, center.X=TRUE)
dat <- tmp$yX
table(dat$y)
## End(Not run)
# y <- dat$y
# print(c(mean(y), dat$cm1))
# print(c(var(y), dat$cm2, dat$cm22))
# print(c(skewness(y), dat$g1))
# dat1 <- rvg4yx(N=1e1, xreg=FALSE, pars=2, ztrunc=TRUE, shape=4)
# y1 <- dat1$y
# print(c(mean(y1), dat1$cm1))
# print(c(var(y1), dat1$cm2, dat1$cm22, dat1$cm23))
# print(c(skewness(y1), dat1$g1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.