I am learning R for a modeling class and have no idea where to begin when performing a random sample. I need to be able to perform a stratified random sample to relate how the density of trees is related to their diversity in certain areas and simulate data for the density/diversity in each 1 m^2 area.
Strata= High, Medium, Low elevation
High elevation has an area of 1000 m^2, medium is 500 m^2, and low is 100 m^2
Need to sample 20% of 1 m^2 areas at each elevation and determine density and diversity in each one.
Average Number of species per 1 m^2 (diversity) = 18
Average density of trees = 100 per 3 m^2..... and variance = 25
I created 3 arrays of 1000x1000, 500x500, and 100x100 to simulate each elevation but now I am stuck. I do not know how to implement the variables associated with the avg # of species and density and its variance, and I also do not know how to sample only 20% of each area. This is my first week in the course learning R, any help would be appreciated.
Aucun commentaire:
Enregistrer un commentaire