Skip to content

Variance components table branch #76

@erex

Description

@erex

Trying to assess variance components table added to dht in this branch.

  • Used Savannah_sparrow_1980 as test case.
  • Tried to compare results with Distance for Windows
  • data sets in R and Distance for Windows don't match
  • exported DistWin data and took into R
  • used region.table, sample.table, obs.table because multispecies data frame was going to be subset
  • created new problem that prevented comparing DistWin with dht components table
  • Problem was this
    • Savannah_sparrow has multiple strata
    • transect numbers start with 1 within each stratum
    • all laid out in sample.table
    • however, all detections are assigned to the first stratum (none to strata 2 and 3)
  • compares transect numbering in other R data sets
    • minke numbers transects across strata (does not begin numbering again at 1)
    • amakihi does number transects starting at 1 for each stratum (temporal replicate survey as stratum)

Note the data issue has been resolved, see next comment

songbirds.csv

birds <- read.csv("E:/Troubleshoot/Arapaho/songbirds.csv", header=TRUE)
birds80 <- birds[birds$Year==1980, ]
table(birds$species, birds$Region.Label)
regtab <- data.frame(Region.Label=unique(birds80$Region.Label),
                     Area=rep(1,3))
p1.stns <- c(seq(1:110), seq(112, 122, by=2), seq(150, 156, by=2))
p2.stns <- seq(1:125)
p3.stns <- c(seq(1:4), seq(6, 25, by=1), seq(27, 125, by=1))
samtab <- data.frame(Sample.Label=c(p1.stns, p2.stns, p3.stns) ,
                     Region.Label=c(rep("1980_1", length(p1.stns)),
                                    rep("1980_2", length(p2.stns)),
                                    rep("1980_3", length(p3.stns))) ,
                     Effort=1)
obstab <- data.frame(object=birds80$Observation,
                     Region.Label=birds80$Region.Label,
                     Sample.Label=birds80$Sample.Label)
cu <- convert_units("meter", NULL, "hectare")
sasp <- birds80[birds80$species=='SASP', ]
# obstab <- data.frame(object=sasp$Observation,
#                      Region.Label=sasp$Region.Label,
#                      Sample.Label=sasp$Sample.Label)

hncos <- ds(sasp, key="hn", transect="point",
            convert_units = cu,
            region_table = regtab, sample_table = samtab,
            obs_table = obstab)

Metadata

Metadata

Labels

To discussRequires discussiontriageNew items to look at and decide what to do

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions