[Yuima-commits] r173 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 8 15:41:00 CEST 2011
Author: iacus
Date: 2011-08-08 15:40:59 +0200 (Mon, 08 Aug 2011)
New Revision: 173
Modified:
pkg/yuima/R/phi.test.R
Log:
phi test
Modified: pkg/yuima/R/phi.test.R
===================================================================
--- pkg/yuima/R/phi.test.R 2011-08-08 12:07:35 UTC (rev 172)
+++ pkg/yuima/R/phi.test.R 2011-08-08 13:40:59 UTC (rev 173)
@@ -18,10 +18,10 @@
H1 <- coef(qmle(yuima, ...))
est <- TRUE
}
- g0 <- quasiloglvec(yuima=yuima, param=H0, print=print, env)
- g1 <- quasiloglvec(yuima=yuima, param=H1, print=print, env)
- div <- mean(phi(g1-g0), na.rm=TRUE)
- stat <- 2*sum(phi(g1-g0), na.rm=TRUE)
+ g0 <- exp(quasiloglvec(yuima=yuima, param=H0, print=print, env))
+ g1 <- exp(quasiloglvec(yuima=yuima, param=H1, print=print, env))
+ div <- mean(phi(exp(g1-g0)), na.rm=TRUE)
+ stat <- 2*sum(phi(exp(g1-g0)), na.rm=TRUE)
df <- length(H0)
val <- list(div=div, stat=stat, H0=H0, H1=H1, phi=deparse(substitute(phi)), pvalue=1-pchisq(stat, df=df), df=df,est=est)
attr(val, "class") <- "phitest"
More information about the Yuima-commits
mailing list