Notes and to-do for s6methods
branch of Rdistance:
newdata
. If you do this, you could also plot bars associated with the covariate classes. This is complicated because you will need to tidyr::unite covariate values in the newdata
and the model.matrix
and figure out which rows from model.matrix
are associated with which rows in newdata
. Factors are easy. For numeric covariates, you can say a distance is associated with a numeric value of X if it is within 1 standard deviation of X. distance
gives. beta ~ observer
and gamma ~ observer
. I think this will require a whole new estimation function. Logistic, Uniform, Triangle, and Huber Likelihoods: Implement logistic and uniform likelihoods. You took them out of version 4.0.0. I think you need to use the EM algorithm. See next note. You placed the old versions in CodeParkingLot/OtherLikelihoods
.
Uniform likelihood: Fix this. I am pretty sure you need to use the EM algorithm. See this Stack Exchange post. I have the following: $$ z = 0.5I(w_l < x < \theta) $$ and $$ \theta = \sum(z) / n + w_l $$ this is close to correct, but not. I think the $z$ need to change each iteration. See papers Mukai sent you.
add1
and drop1
and extractAIC
so that step
function will work with distance function objects. You have most of these testing files drafted in Rdistance/CodeParkingLot/tests/version3.1.1
.
onLoad
)type = density
in predict(dfunc)
distance::ds
and other routines. This should become a vignette or paper. Missing values in an observation contribute to either distance function estimation ('dfunc') or abundance estimation ('abundance') as follows:
tabl <- " | Distance | Group Size | Transect len | Contributes to: | Comment | |:---------------:|:-----------:|:-------------:|:----------------:|:-------------------------:| | present | present | present | dfunc; abundance | usual observation | | MISSING | present | present | abundance | | | present | MISSING | present | dfunc; abundance |for abundance, length only | | present | present | MISSING | dfunc | | | MISSING | MISSING | present | abundance | so-called zero transect | | present | MISSING | MISSING | dfunc | | | MISSING | present | MISSING | nothing | *ignored* | | MISSING | MISSING | MISSING | nothing | *does not happen* | " cat(tabl) # output the table in a format good for HTML/PDF/docx conversion
Group size values never contribute to distance function estimation. Distance functions are estimated from distances only.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.