hi!! imade many codes during these days..
I study Statistics....
please one more question!!
ex1<-function(n,p,rho){
muvec1=zeros(1,p)
A=eye(p)
for(i in 1:p){
for(j in 1:p){
A[i,j]=rho^(abs(i-j))
X=mvrnorm(n,muvec1,A)}}
return(X)
}
this code generates design matrix in linare regression model..
but this code only one data set..
Is there any method to generate several data sets(design Matrix)??(in R
program)
please give me help..
--
View this message in context:
http://r.789695.n4.nabble.com/question-tp2309277p2309277.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.