estWD {windAC} | R Documentation |
Weighted Distribution Estimation
Description
Maximum likelihood estimatation of a weighted probability density function is completed. is done on a weighted distribution. The weighted distribution is a typical probability density distribution multiplied by a weight function. The weight function can be used to truncate the distribution by returning zero beyond some threshold value.
Usage
estWD(fatDist, weightFun, distribution, ...)
weightedDistribution(fatDist, weightFun, distribution, ...)
Arguments
fatDist |
Vector of fatality distanes from the turbine. |
weightFun |
R function that is multipled by the probability distribution, see details. |
distribution |
Character indicating the distribution for |
... |
Additional arguments passed to |
Details
The function estWD
is a convient wrapper function to weightedDistribution
, for fitting multiple distributions.
The weight function should return a (relative) probability of detection at every distance.
Typically this is the proportion of area searched.
The function weightFun
is set up to take a table of proportion of area searched and return values in a function format.
Let be the weight function (
weightFun
), be a probability density function (specified by
distribution
, be the vector of carcass distances from the turbine (
fatDist
), and be the parameter vector to be estimated.
The weighted distribution is
The likelihood that is maximized is
Value
Data frame of the parameter estimates with fit statistics.
See Also
Examples
## load the data
data(carcassDistance)
data(proportionAreaSearched)
###############################################
## fit for fall carcasses found on road and pad (RP)
distanceFallRP <- subset(carcassDistance,plotType=='RP'&season=='fall',
select=distanceFromTurbine,drop=TRUE)
fallRPFit <- estWD(fatDist=distanceFallRP,weightFun=weightFun,
distribution=c('norm','gamma','weibull'),propTable=proportionAreaSearched,type='RP',
typeCol='plotType',distanceCol='distanceFromTurbine',propCol='proportionAreaSearched',
maxDistance=100)
###############################################
## fit for fall carcasses found on full plots
distanceFallFP <- subset(carcassDistance,plotType=='FULL'&season=='fall',
select=distanceFromTurbine,drop=TRUE)
fallFPFit <- estWD(fatDist=distanceFallFP,weightFun=weightFun,
distribution=c('norm','gamma','weibull'),propTable=proportionAreaSearched,type='FULL',
typeCol='plotType',distanceCol='distanceFromTurbine',propCol='proportionAreaSearched',
maxDistance=100)