Description Usage Arguments Value References See Also Examples
The function provides multivariate normal distribution data for regression purposes. It can generate predictors and a response at the same time or only predictors.
1 |
sigma |
A variance covariance matrix of dimension |
n |
The number of observations required to be generated. |
mean |
A vector of length |
method |
Possible methods are eigenvalue decomposition |
sd |
A vector of standard deviations of length |
Beta |
A vector of length |
A data frame consisting of
X |
The generated predictors. |
Y |
The generated response if required. |
Alan, G. Frank, B. (2009), Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics, Vol. 195., Springer-Verlag, Heidelberg. ISBN 978-3-642-01688-2.
Alan, G. Frank, B. Tetsuhisa, M. Xuefe, M. Friedrich, L. Fabian, S. and Torsten, H. (2019). mvtnorm: Multivariate Normal and t Distributions. R package version 1.0-7. URL http://CRAN.R-project.org/package=mvtnorm.
Aldahmani, S. and Dai, H. (2015). Unbiased Estimation for Linear Regression When n< v. International Journal of Statistics and Probability, 4(3), p61.
Csardi, G., and Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, Complex Systems, 1695(5), 1-9.
Dethlefsen, C., and H?jsgaard, S. (2005). A common platform for graphical models in R: The gRbase package. Journal of Statistical Software, 14(17), 1-12.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(mvtnorm)
# Generate sigma
set.seed(1234)
sigma <- matrix(0, nrow =5,ncol=5)
sigma[1:5,1:5]<-.5
diag(sigma)<-3
# Generate vectors of Beta, mean and standard deviation
Beta1<- round(runif(5,1.5,3.5),1)
mu <- runif(5, 0, 0)
sd <- runif(5, 1, 1)
# Get the multivariate normal distribution data
set.seed(123)
result <-mvnData(sigma=sigma, n=10,mean=mu,sd=1,Beta=Beta1)
result
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.