Hi folks,
I performed an analysis using the ds function with three covariates, as follows:
model <- ds(df_dist, key="hr", convert_units=conversion.factor, formula = ~ size + region.label + env)
The df_dist (flatfile) is a dataframe with information about the region of the transect (four classes), the area of each region (four different values), and the type of environment (three classes) of each transect. Additionally, those transects with records are classified into two classes (big or small).
The output of the analysis returns the abundance for each region, but we want to estimate the abundances of each size class in each region and environment type.
Can I use the dht2 function?
When using dht2 like this:
dht2(ddf=model, flatfile=df_dist, strat_formula=~size, convert_units=conversion.factor, stratification="object")
we get the following error:
Error in dht2(ddf = model, flatfile = df_dist, strat_formula = ~size,:
>1 Area defined for a single stratum label, check data
I understand the problem, but is it possible to aggregate the areas within the same function to obtain the abundance by size, area and environment? Can anyone help me, please?
Thank you, Juan
size
or env
. That gave rise to the error message you received.env
, you would have designed your survey to place effort within the three
env
classes. They could have then formed a secondary component of your geographic stratification. You could have defined 12 different strata (all region x
env
) combinations with an area for each of the 12. I don't see how to accomplish that post-hoc.