Hi Eric, hi listfolk,
I think there was a bug in how the histogram was rescaled for the point
transect pdf case (it was being rescaled when it didn't need to be).
Eric: can you try out the new version I've just pushed to github and see
whether you get something working? Else please send your example data to
me off-list and I'll take a look and we can report back to the list.
You can install the latest version of mrds using the devtools package:
library(devtools)
install_github("DistanceDevelopment/mrds")
cheers,
--dave
On 12/05/2016 13:37,
ej...@st-andrews.ac.uk wrote:
> Good day,
> Below are simple histograms of some simulated distance data from point
> transects.
>> par(mfrow = c(1,2))
>> hist(trunc.dat, main=NULL, probability=TRUE)
>> hist(trunc.dat, breaks = c(1,4,7,10,15), main = NULL, probability = TRUE)
>
>
>
> Note that when I specify "probability = FALSE", I get the following plot
> and error message.
>>hist(trunc.dat, breaks = c(1,4,7,10,15), main = NULL, probability = FALSE)
> Warning message:
> In plot.histogram(r, freq = freq1, col = col, border = border, angle =
> angle, :
> the AREAS in the plot are wrong -- rather use 'freq = FALSE'
>
>
>
>
> When I plot the pdf of detection probability for a model fitted to these
> data, the histogram looks like the one where the areas are wrong, and
> the line does not match the data.
>>plot(
fit.hn, pdf = T)
>
> The simple fix recommended for the histogram doesn't work with plot.ds().
>> plot(
fit.hn, pdf = T, freq=FALSE)
> Error in plot.histogram(hh, ylim = ylim, xlab = xlab, ylab = ylab, main
> = "", :
> formal argument "freq" matched by multiple actual arguments
>
> Any ideas why plot.ds is produces a histogram that is apparently wrong
> behind the line for the fitted pdf, or other ways to produce an accurate
> plot?
>
> Thanks,
> Eric
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "distance-sampling" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
distance-sampl...@googlegroups.com
> <mailto:
distance-sampl...@googlegroups.com>.
> To post to this group, send email to
distance...@googlegroups.com
> <mailto:
distance...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/distance-sampling/890a46f6-ff8e-42c9-b142-a9e297060799%40googlegroups.com
> <
https://groups.google.com/d/msgid/distance-sampling/890a46f6-ff8e-42c9-b142-a9e297060799%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.