[Pomp-commits] r1014 - in pkg/pomp: inst inst/include src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Dec 5 18:44:13 CET 2014


Author: kingaa
Date: 2014-12-05 18:44:13 +0100 (Fri, 05 Dec 2014)
New Revision: 1014

Modified:
   pkg/pomp/inst/NEWS.Rd
   pkg/pomp/inst/include/pomp.h
   pkg/pomp/src/pomp.h
Log:
- improve documentation in 'pomp.h'
- updated NEWS

Modified: pkg/pomp/inst/NEWS.Rd
===================================================================
--- pkg/pomp/inst/NEWS.Rd	2014-12-04 14:55:35 UTC (rev 1013)
+++ pkg/pomp/inst/NEWS.Rd	2014-12-05 17:44:13 UTC (rev 1014)
@@ -1,5 +1,12 @@
 \name{NEWS}
 \title{News for package `pomp'}
+\section{Changes in \pkg{pomp} version 0.55-1}{
+  \itemize{
+    \item New \code{values} method extracts simulated probe values on \code{probed.pomp} object.
+    \item Better documentation in the \file{pomp.h} header file.
+    \item Vignettes now feature \code{bsmc2} instead of \code{bsmc}.
+  }
+}
 \section{Changes in \pkg{pomp} version 0.54-1}{
   \itemize{
     \item A modified version of the Liu and West (2001) algorithm is included as \code{bsmc2}.

Modified: pkg/pomp/inst/include/pomp.h
===================================================================
--- pkg/pomp/inst/include/pomp.h	2014-12-04 14:55:35 UTC (rev 1013)
+++ pkg/pomp/inst/include/pomp.h	2014-12-05 17:44:13 UTC (rev 1014)
@@ -187,8 +187,8 @@
 //  on input:
 // p          = pointer to parameter vector
 // give_log   = should the log likelihood be returned?
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
+// parindex   = pointer to vector of integers indexing the parameters 
+//              in 'p' in the order specified by the 'paramnames' slot
 //  on output:
 // lik        = pointer to vector containing likelihoods
 
@@ -239,11 +239,24 @@
 
 // C-LEVEL DEFINITIONS OF EULER-MULTINOMIAL DISTRIBUTION FUNCTIONS
 
-// simulate Euler-multinomial transitions
+// reulermultinom: simulate Euler-multinomial transitions
+// Description:
+//  on input:
+// m      = (positive integer) number of potential transitions ("deaths")
+// size   = (positive integer) number of individuals at risk
+// rate   = pointer to vector of transition ("death") rates
+// dt     = (positive real) duration of time interval
+//  on output:
+// trans  = pointer to vector containing the random deviates 
+//          (numbers of individuals making the respective transitions)
+// See '?reulermultinom' and vignettes for more on the Euler-multinomial 
+// distributions.
+//
 // NB: 'reulermultinom' does not call GetRNGstate() and PutRNGstate() internally
 // this must be done by the calling program
-// But note that when reulermultinom is called inside a pomp 'rprocess', there is no need to call
-// {Get,Put}RNGState() as this is handled by pomp
+// But note that when reulermultinom is called inside a pomp 'rprocess',
+// there is no need to call {Get,Put}RNGState() as this is handled by pomp
+
 static void reulermultinom (int m, double size, double *rate, 
 			    double dt, double *trans) {
   double p = 0.0;
@@ -278,7 +291,21 @@
   }
 }
 
-// COMPUTE PROBABILITIES OF EULER-MULTINOMIAL TRANSITIONS
+// deulermultinom: probabilities of Euler-multinomial transitions
+// Description:
+//  on input:
+// m        = (positive integer) number of potential transitions ("deaths")
+// size     = (positive integer) number of individuals at risk
+// rate     = pointer to vector of transition ("death") rates
+// dt       = (positive real) duration of time interval
+// trans    = pointer to vector containing the data
+//            (numbers of individuals making the respective transitions)
+// give_log = 1 if log probability is desired; 0 if probability is desired
+//  return value: probability or log probability (as requested)
+// 
+// See '?deulermultinom' and vignettes for more on the Euler-multinomial 
+// distributions.
+
 static double deulermultinom (int m, double size, double *rate, double dt, 
 			      double *trans, int give_log) {
   double p = 0.0;

Modified: pkg/pomp/src/pomp.h
===================================================================
--- pkg/pomp/src/pomp.h	2014-12-04 14:55:35 UTC (rev 1013)
+++ pkg/pomp/src/pomp.h	2014-12-05 17:44:13 UTC (rev 1014)
@@ -187,8 +187,8 @@
 //  on input:
 // p          = pointer to parameter vector
 // give_log   = should the log likelihood be returned?
-// parindex   = pointer to vector of integers indexing the parameters in 'p' in the order specified by 
-//                the 'paramnames' slot
+// parindex   = pointer to vector of integers indexing the parameters 
+//              in 'p' in the order specified by the 'paramnames' slot
 //  on output:
 // lik        = pointer to vector containing likelihoods
 
@@ -239,11 +239,24 @@
 
 // C-LEVEL DEFINITIONS OF EULER-MULTINOMIAL DISTRIBUTION FUNCTIONS
 
-// simulate Euler-multinomial transitions
+// reulermultinom: simulate Euler-multinomial transitions
+// Description:
+//  on input:
+// m      = (positive integer) number of potential transitions ("deaths")
+// size   = (positive integer) number of individuals at risk
+// rate   = pointer to vector of transition ("death") rates
+// dt     = (positive real) duration of time interval
+//  on output:
+// trans  = pointer to vector containing the random deviates 
+//          (numbers of individuals making the respective transitions)
+// See '?reulermultinom' and vignettes for more on the Euler-multinomial 
+// distributions.
+//
 // NB: 'reulermultinom' does not call GetRNGstate() and PutRNGstate() internally
 // this must be done by the calling program
-// But note that when reulermultinom is called inside a pomp 'rprocess', there is no need to call
-// {Get,Put}RNGState() as this is handled by pomp
+// But note that when reulermultinom is called inside a pomp 'rprocess',
+// there is no need to call {Get,Put}RNGState() as this is handled by pomp
+
 static void reulermultinom (int m, double size, double *rate, 
 			    double dt, double *trans) {
   double p = 0.0;
@@ -278,7 +291,21 @@
   }
 }
 
-// COMPUTE PROBABILITIES OF EULER-MULTINOMIAL TRANSITIONS
+// deulermultinom: probabilities of Euler-multinomial transitions
+// Description:
+//  on input:
+// m        = (positive integer) number of potential transitions ("deaths")
+// size     = (positive integer) number of individuals at risk
+// rate     = pointer to vector of transition ("death") rates
+// dt       = (positive real) duration of time interval
+// trans    = pointer to vector containing the data
+//            (numbers of individuals making the respective transitions)
+// give_log = 1 if log probability is desired; 0 if probability is desired
+//  return value: probability or log probability (as requested)
+// 
+// See '?deulermultinom' and vignettes for more on the Euler-multinomial 
+// distributions.
+
 static double deulermultinom (int m, double size, double *rate, double dt, 
 			      double *trans, int give_log) {
   double p = 0.0;



More information about the pomp-commits mailing list