Description Usage Arguments Value See Also Examples
View source: R/GoF.r View source: R/2DLTGoF.R
Calculates goodness-of-fit in perpendicular dimension, plots fit, and returns p-value and
other stuff. Returns two p-values: p.ks
is the Kolmogarov-Smirnov p-value (which is
based on only the largest difference between emprical and theoretical cdfs), and Cramer-von Mises
p-value (which is based on all cdf values).
Calculates goodness-of-fit in perpendicular dimension, plots fit, and returns p-value and
other stuff. Returns two p-values: p.ks
is the Kolmogarov-Smirnov p-value (which is
based on only the largest difference between emprical and theoretical cdfs), and
Cramer-von Mises p-value (which is based on all cdf values).
1 2 3 |
plot |
If TRUE, does Q-Q plot. Point corresponding to largest difference between empirical and theoretical cdf (on which the Kolmogarov-Smirnov test is based) is circled in red. |
hmltm |
fitted model, as output by |
hmltm |
fitted model, as output by |
plot |
If TRUE, does Q-Q plot. Point corresponding to largest difference between empirical and theoretical cdf (on which the Kolmogarov-Smirnov test is based) is circled in red. |
data frame with these elements
$p.cvm
= Cramer-von Mises p-value.
$D.kolomogarov
= x value of Kolmogarov-distributed random variable
$p.kolomogarov
= kolomogarov p-value (which is
based on only the largest difference between emprical and theoretical cdfs).
$qq.x
= empirical distribution function values.
$qq.y
= cumulative distribution function values.
$x
= x values.
data frame with these elements
$p.cvm
= Cramer-von Mises p-value.
$D.kolomogarov
= x value of Kolmogarov-distributed random variable
$p.kolomogarov
= kolomogarov p-value (which is
based on only the largest difference between emprical and theoretical cdfs).
$qq.x
= empirical distribution function values.
$qq.y
= cumulative distribution function values.
$x
= x values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
ystart=0.05;w=0.03
logphi=c(0.0180552, -4.4215995)
b=c(-23.725809, -3.136638 , 2.122910)
N=200 #true number of animals
#generate some observations
simDat=simXY(N=N,pi.x=pi.norm,logphi=logphi,hr=ip1,b=b,w=w,ystart=ystart)
x=simDat$locs$x; y=simDat$locs$y
est.yx=fityx(y,x,b,hr=ip1,ystart,pi.x=pi.norm,logphi,w)
plotfit.x(x=x,est=est.yx)
rug(x=est.yx$dat$x)
tst=GoFx(fit=est.yx,plot=TRUE)
## End(Not run)
## Not run:
ystart=0.05;w=0.03
logphi=c(0.0180552, -4.4215995)
b=c(-23.725809, -3.136638 , 2.122910)
N=200 #true number of animals
#generate some observations
simDat=simXY(N=N,pi.x=pi.norm,logphi=logphi,
hr=ip1,b=b,w=w,ystart=ystart)
x=simDat$locs$x; y=simDat$locs$y
est.yx=fityx(y,x,b,hr=ip1,ystart,pi.x=pi.norm,logphi,w)
plotfit.x(x=x,est=est.yx)
rug(x=est.yx$dat$x)
tst=GoFx(fit=est.yx,plot=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.