Dear R users,

I have a few questions about the use of the function spsurvey.analysis. First 
I'll describe my data and after I'll show you how I'm using the function. I 
hope someone has the time to help me out.

My data is composed by n = 60 soil observations which were sampled in linear 
transects. Each transect had exactly n = 5 equally spaced (100 m) soil 
observations. The total number of transects sampled is n = 12 out of a 
population of predefined n = 180 transects. This gives me a finite population 
of soil observations of n = 900. Transects (stage one sampling units) were 
selected probabilistically:
> (prob <- 12/180) 
[1] 0.06666667
> (wgt1 <- 1/prob)
[1] 15
And the probability of selecting each stagetwo sampling unit in a transect was:
> (prob <-1/5) 
[1] 0.2
> (wgt <- 1/prob)
[1] 5

Question 1: should I adjust final weights or use wgt1 <- rep(15, 60) and wgt <- 
rep(5, 60)?

The other information I'm passing to function spsurvey.analysis are:
> # sites to use in the analysis ---------------------------------------
> siteID <- val.field$sampleid 
> sites <- data.frame(siteID, rep(TRUE, length(mydata$sampleid)))
> colnames(sites) <- c("siteID", "use.sites")
> # populations and subpopulations ------------------------------------- 
> subpop <- data.frame(siteID, rep("All Sites", length(mydata$sampleid)))
> colnames(subpop) <- c("siteID", "all.sites")
> # clusters name ------------------------------------------------------
> clusters <- paste("Cluster ", rep(1:12, rep(5, 12)), sep = "") 
> # design data frame --------------------------------------------------
> design <- data.frame(siteID, wgt, coordinates(mydata)[,1], 
> coordinates(mydata)[,2], clusters, wgt1, xcoord1, ycoord1)
> colnames(design) <- c("siteID", "wgt", "xcoord", "ycoord", "cluster", "wgt1", 
> "xcoord1", "ycoord1")

Please take a look at the stage1size object. Is it correct?
> stage1size <- list(c("Cluster 1"=5, "Cluster 2"=5, "Cluster 3"=5, "Cluster 
> 4"=5, "Cluster 5"=5, "Cluster 6"=5, "Cluster 7"=5, "Cluster 8"=5, "Cluster 
> 9"=5, "Cluster 10"=5, "Cluster 11"=5, "Cluster 12"=5))

And now the spsurvey.analysisfunction:
> val.elev <- spsurvey.analysis(sites = sites, subpop = subpop, design = 
> design, data.cont = data.cont, N.cluster = 180, stage1size = stage1size, 
> support = rep(1, 60), vartype = "Local", conf = 95, pctval = c(5, 10, 25, 50, 
> 75, 90, 95))

Which is the correct value for N.cluster, the number of stage one sampling 
units in the resource? 180 or 12? Is the argument popsize of any use here?

Many thanks in advance for the help.


Alessandro Samuel-Rosa
Postgraduate Course in Agronomy - Soil Science
Federal Rural University of Rio de Janeiro
Seropédica, Rio de Janeiro, Brazil
soil-scientist.net

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to