Description Usage Arguments Details Value See Also Examples
View source: R/2DLTfunctions.r
Plot f(y) and forward distance distribution
resulting from a call of fityx
.
1 2 3 |
y |
forward distance observations (if NULL, uses est$dat$y) |
x |
perpendicular distance observations (if NULL, uses est$dat$x) |
est |
return from a call of |
nclass |
number of histogram classes |
breaks |
break points passed to hist (overrides nclass if not NULL) |
plot |
boolean, plot results |
lineonly |
if TRUE plots only f(y), else plots histogram of forward distances too |
nint |
number of intervals to use in calculating f(y) |
max.obs |
If TRUE, plots only up to maximum observed forward distance, else plots up to est$ystart (the forward distance beyond which detection is assumed impossible). |
add |
if TRUE, adds line to existing plot, else creates new plot. Only applicable if lineonly==TRUE. |
... |
other parameters passed to |
Plot f(y) and forward distance distribution resulting from a call of
fityx
, optionall with overlaid histogram of foward distances.
Invisibly returns various f(y)'s, as detailed below.
Invisibly returns a list with these elements
$gridx
= x values used in plotting
$fy.x
= Unscaled f(y|x) for all the xs observed
$fy.
= Unscaled mean of f(y|x) for all the xs observed
$scaled. fy.
= Mean of f(y|x), scaled to integrate to 1
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
ystart=4;w=1
hr=h2; b=log(c(0.75,1))
pi.x=pi.norm; logphi=c(0.5,log(0.2))
N=50 #true number of animals
#generate some observations
simDat=simXY(N=N,pi.x=pi.x,logphi=logphi,
hr=hr,b=b,w=w,ystart=ystart)
x=simDat$locs$x; y=simDat$locs$y
est.yx=fityx(y,x,b,hr,ystart,pi.x,logphi,w)
plotfit.y(y,x,est.yx,nclass=10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.