[Pomp-commits] r792 - in branches/mif2: R inst/include man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 7 21:15:22 CET 2013


Author: kingaa
Date: 2013-01-07 21:15:21 +0100 (Mon, 07 Jan 2013)
New Revision: 792

Modified:
   branches/mif2/R/pfilter-methods.R
   branches/mif2/inst/include/pomp.h
   branches/mif2/man/pfilter-methods.Rd
Log:
- more merges from main branch


Modified: branches/mif2/R/pfilter-methods.R
===================================================================
--- branches/mif2/R/pfilter-methods.R	2013-01-07 19:57:07 UTC (rev 791)
+++ branches/mif2/R/pfilter-methods.R	2013-01-07 20:15:21 UTC (rev 792)
@@ -1,5 +1,7 @@
 setMethod("$",signature(x="pfilterd.pomp"),function (x,name) slot(x,name))
 setMethod("logLik",signature(object="pfilterd.pomp"),function(object,...)object at loglik)
+setMethod("eff.sample.size",signature(object="pfilterd.pomp"),function(object,...)object at eff.sample.size)
+setMethod("cond.logLik",signature(object="pfilterd.pomp"),function(object,...)object at cond.loglik)
 
 ## extract the prediction means
 setMethod(
@@ -31,4 +33,3 @@
             object at filter.mean[pars,]
           }
           )
-

Modified: branches/mif2/inst/include/pomp.h
===================================================================
--- branches/mif2/inst/include/pomp.h	2013-01-07 19:57:07 UTC (rev 791)
+++ branches/mif2/inst/include/pomp.h	2013-01-07 20:15:21 UTC (rev 792)
@@ -6,6 +6,7 @@
 #include <R.h>
 #include <Rmath.h>
 #include <Rdefines.h>
+#include <R_ext/Rdynload.h>
 
 // facility for extracting R objects from the 'userdata' slot
 const SEXP get_pomp_userdata (const char *name);
@@ -192,7 +193,14 @@
 // a vector of parameters ('coef') against a vector of basis-function values ('basis')
 double dot_product (int dim, const double *basis, const double *coef);
 
+static R_INLINE double logit (double p) {
+  return log(p/(1.0-p));
+}
 
+static R_INLINE double expit (double x) {
+  return 1.0/(1.0+exp(-x));
+}
+
 // prototypes for C-level access to Euler-multinomial distribution functions
 
 // simulate Euler-multinomial transitions

Modified: branches/mif2/man/pfilter-methods.Rd
===================================================================
--- branches/mif2/man/pfilter-methods.Rd	2013-01-07 19:57:07 UTC (rev 791)
+++ branches/mif2/man/pfilter-methods.Rd	2013-01-07 20:15:21 UTC (rev 792)
@@ -12,6 +12,12 @@
 \alias{filter.mean}
 \alias{filter.mean,pfilterd.pomp-method}
 \alias{filter.mean-pfilterd.pomp}
+\alias{eff.sample.size}
+\alias{eff.sample.size,pfilterd.pomp-method}
+\alias{eff.sample.size-pfilterd.pomp}
+\alias{cond.logLik}
+\alias{cond.logLik,pfilterd.pomp-method}
+\alias{cond.logLik-pfilterd.pomp}
 \title{Methods of the "pfilterd.pomp" class}
 \description{Methods of the "pfilterd.pomp" class.}
 \usage{
@@ -19,6 +25,8 @@
 \S4method{pred.mean}{pfilterd.pomp}(object, pars, \dots)
 \S4method{pred.var}{pfilterd.pomp}(object, pars, \dots)
 \S4method{filter.mean}{pfilterd.pomp}(object, pars, \dots)
+\S4method{eff.sample.size}{pfilterd.pomp}(object, \dots)
+\S4method{cond.logLik}{pfilterd.pomp}(object, \dots)
 }
 \arguments{
   \item{object}{



More information about the pomp-commits mailing list