[R] How to print and save simulated data?

Dieter Menne dieter.menne at menne-biomed.de
Sun Feb 13 17:17:11 CET 2011



wanfairos wrote:
> 
> Dear members;
> 
> I have one problem to display my simulated data. Basically, I've generated
> a set of rnorm (std.norm.mat)and rnbinom (gen.data) data to test on the
> performance of FE Poisson model estimates 
> 
> ... Long self-contained example shorted
> 
> my.data<-rep(9999,sim.size)
> 
> for(i in 1: sim.size){
> ...
> gen.data <- matrix(rnbinom(num.i * num.t, r.param,p.param),ncol=2)
> 
> my.data[i]<-gen.data
> }
> 

gen.data is a matrix with to columns, my.data a vector. You should assign
the results to a list or do some sort of cbind, depending on what you need.

Dieter



-- 
View this message in context: http://r.789695.n4.nabble.com/How-to-print-and-save-simulated-data-tp3303595p3303761.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list