[Depmix-commits] r448 - in pkg/depmixS4: . R inst/doc man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 23 14:13:56 CET 2010


Author: ingmarvisser
Date: 2010-11-23 14:13:55 +0100 (Tue, 23 Nov 2010)
New Revision: 448

Modified:
   pkg/depmixS4/DESCRIPTION
   pkg/depmixS4/NEWS
   pkg/depmixS4/R/makePriorModel.R
   pkg/depmixS4/R/makeTransModels.R
   pkg/depmixS4/inst/doc/depmixS4.Rnw
   pkg/depmixS4/inst/doc/depmixS4.pdf
   pkg/depmixS4/man/GLMresponse.Rd
   pkg/depmixS4/man/responses.Rd
Log:
Final minor changes (NEWS, DESCRIPTION etc) for release 1.0-1

Modified: pkg/depmixS4/DESCRIPTION
===================================================================
--- pkg/depmixS4/DESCRIPTION	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/DESCRIPTION	2010-11-23 13:13:55 UTC (rev 448)
@@ -1,6 +1,6 @@
 Package: depmixS4
 Version: 1.0-1
-Date: 2010-10-18
+Date: 2010-11-23
 Title: Dependent Mixture Models - Hidden Markov Models of GLMs and Other Distributions in S4
 Author: Ingmar Visser <i.visser at uva.nl>, Maarten Speekenbrink <m.speekenbrink at ucl.ac.uk>
 Maintainer: Ingmar Visser <i.visser at uva.nl>

Modified: pkg/depmixS4/NEWS
===================================================================
--- pkg/depmixS4/NEWS	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/NEWS	2010-11-23 13:13:55 UTC (rev 448)
@@ -4,16 +4,24 @@
   o minor changes in documentation to conform to R 2.12.0 standards. 
 
   o fixed a bug concerning random start values (the argument to specify
-    this was not passed to the EM algorithm ...). 
+    this was not passed to the EM algorithm and hence was completely 
+    ineffective ...). 
 
   o changed the emcontrol argument to the fit function; it now calls 
     a function em.control which returns the list of control parameters, which
     now also includes maxit, the max number of iterations of the EM algorithm. 
     This makes future additions to EM control parameters easier. 
 
-  o The use of random parameter initialization is now the default when using EM 
+  o random parameter initialization is now the default when using EM 
     to fit models. 
+  
+  o fixed a bug in multinomial models with n>1; the parameters are now 
+    normalized such that they sum to unity (this was introduced in version
+    0.9-0 in multinomial models with identity link). 
 
+  o added an error message for multinomial response models with n>1 and 
+    link='mlogit' as this case is not handled; n>1 multinomial can use the
+    'identity' link function. 
 
 Changes in depmixS4 version 1.0-0
 
@@ -45,21 +53,21 @@
     present. 
 
   o added bounds and constraints for multinomial identity models such
-	that these constraints are satisfied when fitting models with
-	method="rsolnp" or "donlp".  Also, variance and sd parameters in
-	gaussian and multivariate normal models are given bounds to prevent
-	warnings and errors in optimization of such models using rsolnp or
-	donlp.
+    that these constraints are satisfied when fitting models with
+    method="rsolnp" or "donlp".  Also, variance and sd parameters in
+    gaussian and multivariate normal models are given bounds to prevent
+    warnings and errors in optimization of such models using rsolnp or 
+    donlp.
 
   o added option to generate starting values as part of the EM 
     algorithm. 
 
   o fixed a bug in multinomial response models with n>1; the response for
-	these models can be specified as a k-column matrix with the number of
-	observed responses for each category; the loglikelihood for these
-	models in which there was more than 1 observation per row was
-	incorrect; note that such models may lead to some numerical
-	instabilities when n is large.
+    these models can be specified as a k-column matrix with the number of
+    observed responses for each category; the loglikelihood for these
+    models in which there was more than 1 observation per row was
+    incorrect; note that such models may lead to some numerical
+    instabilities when n is large.
 
 Changes in depmixS4 version 0.3-0
   

Modified: pkg/depmixS4/R/makePriorModel.R
===================================================================
--- pkg/depmixS4/R/makePriorModel.R	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/R/makePriorModel.R	2010-11-23 13:13:55 UTC (rev 448)
@@ -10,7 +10,7 @@
 		initModel <- transInit(~1,data=data.frame(rep(1,ncases)),nst=nstates,family=multinomial(link="identity"),pstart=values)
 	} else {
 		if(is.null(data)) {
-			stop("'Argument initdata missing while the init model is non-trivial")
+			stop("Argument 'initdata' missing with non-trivial prior model")
 		} else {
 			initModel <- transInit(formula,data=data,nst=nstates,family=multinomial(),pstart=values)
 		}	

Modified: pkg/depmixS4/R/makeTransModels.R
===================================================================
--- pkg/depmixS4/R/makeTransModels.R	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/R/makeTransModels.R	2010-11-23 13:13:55 UTC (rev 448)
@@ -5,20 +5,19 @@
 	# FIX ME
 	base=1
 	prob=TRUE
-		
+	
 	if(!stationary&is.null(data)) stop("non-stationary transition models needs data argument")
-		
+	
 	# starting values	
 	tst <- FALSE
 	if(!is.null(values)) {
 		tst <- TRUE
 		values <- matrix(values,nstates,byrow=TRUE)
 	}
-		
+	
 	models <- list()
 	for(i in 1:nstates) {
 		if(tst) {
-			# in the case of stationary models we do not need data?!?!?!?!?!
 			if(stationary) models[[i]] <- transInit(formula,multinomial(link="identity"),data=data.frame(1),nstates=nstates,pstart=values[i,],prob=prob)
 			else models[[i]] <- transInit(formula,multinomial(base=base),data=data,nstates=nstates,pstart=values[i,],prob=prob)
 		} else {

Modified: pkg/depmixS4/inst/doc/depmixS4.Rnw
===================================================================
--- pkg/depmixS4/inst/doc/depmixS4.Rnw	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/inst/doc/depmixS4.Rnw	2010-11-23 13:13:55 UTC (rev 448)
@@ -25,7 +25,8 @@
 \Abstract{	
   This introduction to the \proglang{R} package \pkg{depmixS4} is a (slightly)
   modified version of \cite{Visser+Speekenbrink:2010}, published in the
-  \emph{Journal of Statistical Software}.
+  \emph{Journal of Statistical Software}. Please refer to that 
+  article when using \pkg{depmixS4}. The current version is 1.0-1. 
 
   \pkg{depmixS4} implements a general framework for defining and
   estimating dependent mixture models in the \proglang{R}
@@ -1014,7 +1015,6 @@
 for those.  We are also planning to implement goodness-of-fit
 statistics \citep{Titman2008}.
 
-
 \section*{Acknowledgments} 
 
 Ingmar Visser was supported by an EC Framework 6 grant, project 516542

Modified: pkg/depmixS4/inst/doc/depmixS4.pdf
===================================================================
(Binary files differ)

Modified: pkg/depmixS4/man/GLMresponse.Rd
===================================================================
--- pkg/depmixS4/man/GLMresponse.Rd	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/man/GLMresponse.Rd	2010-11-23 13:13:55 UTC (rev 448)
@@ -56,9 +56,11 @@
 	
 	The \code{multinomial} model takes as link functions \code{mlogit}, the
 	default, and then uses functionality from the \code{nnet} package to
-	fit multinomial logistic models; it also takes \code{identity} as a
-	link function.  The latter is typically faster and is hence preferred
-	when no covariates are present.  
+	fit multinomial logistic models; using \code{mlogit} as link allows
+	only n=1 models to be specified, i.e. a single observation for each
+	occasion; it also takes \code{identity} as a link function.  The latter
+	is typically faster and is hence preferred when no covariates are
+	present.
 	
 	See the \code{\link{responses}} help page for examples. 
 	

Modified: pkg/depmixS4/man/responses.Rd
===================================================================
--- pkg/depmixS4/man/responses.Rd	2010-11-23 12:18:16 UTC (rev 447)
+++ pkg/depmixS4/man/responses.Rd	2010-11-23 13:13:55 UTC (rev 448)
@@ -64,7 +64,9 @@
 
 \section{MVNresponse}{
 
-	\code{MVNresponse} is a model for a multivariate normal distributed response.
+	\code{MVNresponse} is a model for a multivariate normal distributed
+	response.  See code{\link{makeDepmix}} for an example of how to use
+	this and other non-glm like distributions.
 
   \describe{
     \item{y:}{The dependent variable. This is a matrix.}
@@ -79,30 +81,28 @@
 \section{NORMresponse}{
 
 	\code{NORMresponse} is a model for a normal (Gaussian) distributed response.
-  It extends the basic \code{\link{GLMresponse}} class directly.
+	It extends the basic \code{\link{GLMresponse}} class directly.
 
-  \describe{
-    \item{y:}{The dependent variable.}
-    \item{x:}{The design matrix.}
-    \item{Parameters:}{A named list with elements ``coefficients'',
-    which contains the GLM coefficients, and ``sd'', which contains the
-    standard deviation.}
-  }
-
+	\describe{
+		\item{y:}{The dependent variable.}
+		\item{x:}{The design matrix.}
+		\item{Parameters:}{A named list with elements ``coefficients'',
+		which contains the GLM coefficients, and ``sd'', which contains the
+		standard deviation.}
+	}
 }
 
 \section{POISSONresponse}{
 
 	\code{POISSONresponse} is a model for a Poisson distributed response.
-  It extends the basic \code{\link{GLMresponse}} class directly.
-
-  \describe{
-    \item{y:}{The dependent variable.}
-    \item{x:}{The design matrix.}
-    \item{Parameters:}{A named list with a single element ``coefficients'',
-    which contains the GLM coefficients.}
-  }
-
+	It extends the basic \code{\link{GLMresponse}} class directly.
+	
+	\describe{
+    	\item{y:}{The dependent variable.}
+		\item{x:}{The design matrix.}
+		\item{Parameters:}{A named list with a single element ``coefficients'',
+		which contains the GLM coefficients.}
+	}
 }
 
 \examples{



More information about the depmix-commits mailing list