Dear friends,
 I want to do some simulations on Moran's I, but met some problems with
subset my dataset:

First step: generate my dataset
*x<-rnorm(20)*  # generate my attribute data
*y<-cell2nb(4,5)*   # generate my neighbor object
Then my dataset comprise with x(attribute data) and y(position).

Second step:subset my datset
 I don't have any idea on how to get my subset, which is from two different
sampling on my generated data:
1.random sampling:  sample 4 data randomly from my generated data;
2.systematic sampling: Suppose the space is 1, the the subset should be like
the following:
 y:1 3rows,1 3 5colums
 x: the correspding attribute data
 I thought it maybe need to use index to get it , or some other better
methods. I still can't get it through till now, could anybody help me?
 Any suggestions or help would be greatly appreciated1
--
Kind Regards,Zhi Jie,Zhang ,PHD
Department of EpidemiologySchool of Public HealthFudan
UniversityTel:86-21-54237149

	[[alternative HTML version deleted]]


