Description Usage Arguments Details Value See Also Examples
View source: R/2DLTfunctions.r
Plot fitted hazard and perpendicular denisty distribution 
resulting from a call of fityx.  When simulating, true hazard functions
and perpendicular density distribution can also be added to the plot.
| 1 2 3 | 
| x | perpendicular distance observations | 
| nclass | number of histogram classes | 
| nint | number of intervals in numerical integration | 
| plot | boolean, plot results | 
| addTruth | boolean add true hazard and perp. density when simulating | 
| true.pi.x | true perpendicular density distribution function used when simulating | 
| true.logphi | true perpendicular density distribution function parameters used when simulating | 
| true.hr | true hazard rate function used when simulating. | 
| true.b | true hazard rate function parameters used when simulating. | 
| N | true number of animals in simulated distribution, used to calculate bias (see details). | 
| fit | return from a call of  | 
| true.legend | If true (and addTruth) plots legend for true functions in bottom left. | 
When N is specified, bias in estimated number of animals ,\hat N, 
is calculated.
list with:
$gridx = x values used in plotting
$p.xpifit = product of perpendicular distance det probability p(x) 
and perpendicular animal  distribution π(x).
$mufit = effective strip width \hat p
$f.xfit =
$p.xfit =
$ptot =
$p.xfit.std =
$adbn =
$N = true number of animals in population
$n = number of seen animals
$Nhat = estimated number of animals.
$bias = \hat N bias.
| 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)
plotdat.yx=plotfit.x(x,est.yx,addTruth=TRUE,true.logphi=logphi,true.b=b,N=N)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.