Description Usage Arguments Value See Also Examples
View source: R/2DLTfunctions.r
AIC-based model selection of a list of models fitted using fitxy. Parameter estimates for the hazard and perpendicular distribution functions along with associated coefficients of variation are also provided. Models are ranked in order of increasing dAIC. The model list can also be returned in a data frame suitable making a tex-type table.
1 2 |
modList |
a list of fitxy-type models. |
modNames |
a vector of model names. |
tab |
boolean - return a data frame suitable for generating a table for report or paper. |
digits |
- number of digits of rounding (see round) in the table |
maxblength=NULL; |
maximum number of parameters for the hazard function. If NULL the maximum number of parameters for the models in modList is used. |
maxlogphilength=NULL; |
maximum number of parameters for the perpendicular density function. If NULL the maximum number of parameters for the models in modList is used. |
tab=FALSE list; element 1 =data frame of AIC-ranked models, with parameter estimates, coefficients of variation and AIC; element 2= vector of the order of AIC-ranked models. tab=TRUE, a three element list with AIC-ranked model order and two tables, the first as tab=FALSE, the second, a table for use in reports or manuscripts.
fitxy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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
fit1=fityx(y,x,b,hr,ystart,pi.x,logphi,w)
fit2=fityx(y,x,b=log(c(0.001,1)),hr=h1,ystart,pi.x,logphi,w)
modSelect(modList=list(fit1,fit2),modNames=c('h1','h2'),tab=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.