### R program to simulate some large data sets. n = 3000000 # number of observations (rows) k = 10 # number of variables (columns) p1 = 3 # number of locations X = matrix(NA,nrow=n,ncol=k) # ID Numbers X[,1] = 1:n # Locations loc = c(0) for( i in 1:(p1-1) ) { loc = c(loc,i*round(n/p1)) } loc = c(loc,n) # mean lifetime in each group theta1 = 4 theta = c(theta1) for( i in 2:p1){ theta1 = 2*theta1 theta = c(theta,theta1) } # Simulate the Data for( i in 1:p1 ){ X[(loc[i]+1):loc[i+1],2] = i nn = loc[i+1] - loc[i] X[(loc[i]+1):loc[i+1],3:k] = rexp(nn*(k-2),rate = 1/theta[i]) } # permute the data X = apply(X, 2, sample) write.table(X, file = "D:\\SAS Simulated Data\\data01\\data01.txt", row.names=FALSE, col.names=FALSE )