Last chance! 50% off unlimited learning
Sale ends in
Maximum likelihood estimation of a (possibly truncated) probability density function is completed with weights on the likelihood.
estTWL(fatDist, fatW, distribution, plotBounds = NULL, ...)weightedLikelihood(fatDist, fatW, distribution, plotBounds = NULL, ...)
Vector of fatality distances from the turbine.
Vector of weights, to weight the likelihood for estimatation. This must be the same length as fatDist and is assumed to be in the same order as fatDist.
Character indicating the distribution for weightedLikelihood
or vector for estTWL
.
Vector of length 1 or 2. If the length is 2 (or greater) the max value is used as the upper truncation bound and the min value is used as the lower truncation bound. If the length is 1 this value is taken as the upper truncation bound and zero is set as the lower truncation bound. The default is NULL, in which case the bounds are zero and positive infinity.
Additional arguments passed to optim
.
Data frame of the parameter estimates for the distribution with fit statistics.
The truncated likelihood for a single observation is
Where fatDist
, a
and b
correspond to the plotBounds
and f()
is the distribution
chosen.
The truncated weighted likelihood is
n=length(fatDist)
and fatW
.
The truncated weighted likelihood is then estimated using standard maximum likelihood techniques.
See estTWL
for examples.
# NOT RUN {
## load the data
data(carcassDistance)
data(proportionAreaSearched)
## add proportion of area searched to each carcass
carcDist <- merge(carcassDistance,proportionAreaSearched,
by=c('plotType','distanceFromTurbine'),all.x=TRUE)
## create the weight for each carcass
carcDist$w <- with(carcDist,1/(proportionAreaSearched*probabilityDetection))
twlOutput <- with(carcDist,estTWL(fatDist=distanceFromTurbine,fatW=w,plotBounds=c(0,100),
distribution=c('norm','weibull','gamma')))
# }
Run the code above in your browser using DataLab