Binning Issues

47 views
Skip to first unread message

Steve Ahlswede

unread,
Sep 16, 2016, 10:34:42 AM9/16/16
to distance-sampling
I see that someone else in the discussion is having a similar problem with bins as I...I am getting the error in creating bins due to my data set having some NA values. Now I have seen your solution from someone else who had similar problems by using seq() to set up the bins but I need bins of varying lengths and as far as I know I can only make uniform lengths using seq()? If anyone knows how I can set up a sequence for my bins which incorporates varying lengths that would be fantastic! 

Thanks

Steve

Eric Rexstad

unread,
Sep 16, 2016, 11:10:13 AM9/16/16
to Steve Ahlswede, distance-sampling

Steve

How to generate fits with uneven bin widths:

library(Distance)
data(minke)
# cutmink <- create.bins(minke, cutpoints=c(0, 2,5,15))   # fail because of NAs
normal.mink <- ds(minke)
my.mink <- ds(minke, cutpoints=c(0, .2, .5, 1, 2))
par(mfrow=c(1,2))
plot(normal.mink, main="Default cutpoints")
plot(my.mink, main="Bespoke (uneven) cutpoints")

Hope that is useful.

--
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.
To post to this group, send email to distance...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/022ae275-7221-45a7-b37f-a774c7ce045f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Eric Rexstad
Research Unit for Wildlife Population Assessment
Centre for Research into Ecological and Environmental Modelling
University of St. Andrews
St. Andrews Scotland KY16 9LZ
+44 (0)1334 461833
The University of St Andrews is a charity registered in Scotland : No SC013532
Reply all
Reply to author
Forward
0 new messages