[Depmix-commits] r141 - trunk/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 9 16:22:52 CEST 2008


Author: ingmarvisser
Date: 2008-06-09 16:22:51 +0200 (Mon, 09 Jun 2008)
New Revision: 141

Added:
   trunk/man/AIC.Rd
   trunk/man/depmix-methods.Rd
   trunk/man/depmixS4-package.Rd
   trunk/man/posterior.Rd
Modified:
   trunk/man/balance.Rd
   trunk/man/depmix-internal.Rd
   trunk/man/depmix.Rd
   trunk/man/depmix.fit.Rd
   trunk/man/response-classes.Rd
   trunk/man/response.Rd
   trunk/man/simulate.Rd
   trunk/man/speed.Rd
Log:
Restructured help files somewhat

Added: trunk/man/AIC.Rd
===================================================================
--- trunk/man/AIC.Rd	                        (rev 0)
+++ trunk/man/AIC.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -0,0 +1,26 @@
+\name{AIC}
+\alias{AIC}
+\alias{AIC,depmix-method}
+\alias{BIC}
+\alias{BIC,depmix-method}
+
+\title{Compute AIC and BIC for depmix objects}
+\description{
+Compute AIC and BIC for depmix objects.
+}
+\usage{
+AIC(object, ..., k = 2)
+BIC(object, ...)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{object}{A \code{depmix} model.}
+  \item{\dots}{Not used currently.}
+  \item{k}{The penalty factor which defaults to 2.}
+}
+\value{
+	The value of the AIC and BIC
+}
+\references{}
+\author{Ingmar Visser}
+\keyword{htest}

Modified: trunk/man/balance.Rd
===================================================================
--- trunk/man/balance.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/balance.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -19,8 +19,14 @@
 	\item{\code{sex}}{Participants' sex.}
 	\item{\code{agedays}}{Age in days.}
 	\item{\code{age}}{Age in years.}
-	\item{\code{t1-t4}}{Trichotomously scored distance items.}
-	\item{\code{d1-d4}}{Dichotomously scored distance items.}
+	\item{\code{t1}}{Trichotomously scored distance item.}
+	\item{\code{t2}}{Trichotomously scored distance item.}
+	\item{\code{t3}}{Trichotomously scored distance item.}
+	\item{\code{t4}}{Trichotomously scored distance item.}
+	\item{\code{d1}}{Dichotomously scored distance item.}
+	\item{\code{d2}}{Dichotomously scored distance item.}
+	\item{\code{d3}}{Dichotomously scored distance item.}
+	\item{\code{d4}}{Dichotomously scored distance item.}
   }
 }
 

Modified: trunk/man/depmix-internal.Rd
===================================================================
--- trunk/man/depmix-internal.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/depmix-internal.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -16,11 +16,17 @@
 \alias{nstates}
 \alias{pa2conr}
 \alias{viterbi}
+\alias{viterbi2}
 \alias{viterbi.fb}
 
 \alias{dens,GLMresponse-method}
 \alias{dens,BINOMresponse-method}
 \alias{dens,NORMresponse-method}
+
+\alias{dens,GAMMAresponse-method}
+\alias{dens,POISSONresponse-method}
+\alias{dens,MVNresponse-method}
+
 \alias{dens,MULTINOMresponse-method}
 \alias{dens,transInit-method}
 
@@ -56,4 +62,4 @@
 
 \author{Ingmar Visser}
 
-\keyword{methods}
+\keyword{internal}

Added: trunk/man/depmix-methods.Rd
===================================================================
--- trunk/man/depmix-methods.Rd	                        (rev 0)
+++ trunk/man/depmix-methods.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -0,0 +1,76 @@
+\name{depmix-methods}
+
+\docType{methods}
+
+\alias{logLik}
+\alias{logLik,depmix-method}
+
+\alias{nobs}
+\alias{nobs,depmix-method}
+
+\alias{npar}
+\alias{npar,depmix-method}
+
+\alias{freepars}
+\alias{freepars,depmix-method}
+
+\alias{setpars}
+\alias{setpars,depmix-method}
+
+\alias{getpars}
+\alias{getpars,depmix-method}
+
+\title{ The log likelihood. }
+\description{
+Computes the log likelihood of a depmix object.
+}
+\usage{
+	\S4method{logLik}{depmix}(object)
+
+	\S4method{nobs}{depmix}(object)
+	
+	\S4method{npar}{depmix}(object)
+	\S4method{freepars}{depmix}(object)
+	\S4method{setpars}{depmix}(object,which="pars",...)
+	\S4method{getpars}{depmix}(object,which="pars",...)	
+
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{object}{A \code{depmix} pobject}
+
+  \item{which}{The default "pars" returns a vector of all parameters of a
+	  \code{depmix} object; the alternative value "fixed" return a
+	  logical vector of the same length indicating which parameters are
+	  fixed. The setpars functions sets parameters (or the logical fixed 
+	  vector) to new values; \code{setpars} also recomputes the dens,
+	  trans and init slots of \code{depmix} objects. Note that the 
+	  \code{getpars} and \code{setpars} functions for \code{depmix} 
+	  objects simply call the functions of the same name for the response
+	  and transition models.}
+	  
+  \item{...}{Not used currently.}
+
+}
+\value{
+  
+	\item{logLik} {returns a \code{logLik} object with attributes \code{df} and \code{nobs}.}
+	
+	\item{nobs} {returns the number of observations (used in computing the BIC).}
+
+	\item{npar} {returns the number of paramters of a model.}
+
+	\item{freepars} {returns the number of non-fixed parameters.}
+
+	\item{setpars} {returns a depmix object with new parameter values.}
+
+	\item{getpars} {returns a vector with the current parameter values.}
+
+}
+\author{Ingmar Visser}
+\examples{
+
+}
+
+\keyword{methods}
+

Modified: trunk/man/depmix.Rd
===================================================================
--- trunk/man/depmix.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/depmix.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -3,31 +3,12 @@
 
 \docType{methods}
 
-\alias{depmixS4}
 \alias{depmix}
 \alias{depmix,ANY-method}
 
-\alias{logLik}
-\alias{logLik,depmix-method}
+\alias{show}
+\alias{summary}
 
-\alias{BIC}
-\alias{BIC,depmix-method}
-
-\alias{nobs}
-\alias{nobs,depmix-method}
-
-\alias{npar}
-\alias{npar,depmix-method}
-
-\alias{freepars}
-\alias{freepars,depmix-method}
-
-\alias{setpars}
-\alias{setpars,depmix-method}
-
-\alias{getpars}
-\alias{getpars,depmix-method}
-
 \alias{show,depmix-method}
 \alias{summary,depmix-method}
 
@@ -54,15 +35,7 @@
 		ntimes=NULL,...)
 	
 	\S4method{summary}{depmix}(object)
-	\S4method{logLik}{depmix}(object)
-
-	\S4method{BIC}{depmix}(object)
-	\S4method{nobs}{depmix}(object)
 	
-	\S4method{npar}{depmix}(object)
-	\S4method{freepars}{depmix}(object)
-	\S4method{setpars}{depmix}(object,which="pars",...)
-	\S4method{getpars}{depmix}(object,which="pars",...)	
 	
 }
 
@@ -103,16 +76,6 @@
 		independent, time series. If not specified, the responses are
 		assumed to form a single time series. If the data argument has an
 		attribute ntimes, then this is used.}
-	
-	\item{which}{The default "pars" returns a vector of all parameters of a
-		\code{depmix} object; the alternative value "fixed" return a
-		logical vector of the same length indicating which parameters are
-		fixed. The setpars functions sets parameters (or the logical fixed 
-		vector) to new values; \code{setpars} also recomputes the dens,
-		trans and init slots of \code{depmix} objects. Note that the 
-		\code{getpars} and \code{setpars} functions for \code{depmix} 
-		objects simply call the functions of the same name for the response
-		and transition models.}
 		
 	\item{...}{Not used currently.}
 	
@@ -178,12 +141,6 @@
 		parameters, in particular in the multinomial models for the
 		transitions and prior.}
 
-\code{logLik}, \code{AIC}, and \code{BIC} return the respective values
-associated with the current parameter values.  \code{nobs} returns the
-number of observations, ie \code{sum(ntimes)} that is used in computing the
-\code{BIC}.  \code{npar} returns the number of paramters of a model;
-\code{freepars} returns the number of non-fixed parameters.
-
 }
 
 \author{Ingmar Visser \email{i.visser at uva.nl}} 

Modified: trunk/man/depmix.fit.Rd
===================================================================
--- trunk/man/depmix.fit.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/depmix.fit.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -6,9 +6,6 @@
 \alias{depmix.fit}
 \alias{fit,depmix-method}
 
-\alias{posterior}
-\alias{posterior,depmix.fitted-method}
-
 \alias{show,depmix.fitted-method}
 \alias{summary,depmix.fitted-method}
 
@@ -24,7 +21,6 @@
 	\S4method{fit}{depmix}(object, fixed=NULL, equal=NULL, conrows=NULL,
 		conrows.upper=0, conrows.lower=0, method=NULL,...)
 	
-	\S4method{posterior}{depmix.fitted}(object,...)
 	\S4method{summary}{depmix.fitted}(object)
 	
 }
@@ -94,10 +90,6 @@
 	\item{message}{: Convergence information.}
 	
 	\item{conMat}{: The constraint matrix A, see details.}
-
-	\item{posterior}{: Returns a data.frame with nstates(object) + 1
-	columns; the first column has the viterbi states, the other columns
-	have the delta probabilities, see Rabiner (1989).}
 	
 	The print method shows the \code{message} and the summary method
 	shows the parameter estimates.

Added: trunk/man/depmixS4-package.Rd
===================================================================
--- trunk/man/depmixS4-package.Rd	                        (rev 0)
+++ trunk/man/depmixS4-package.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -0,0 +1,53 @@
+\name{depmixS4-package}
+
+\alias{depmixS4-package}
+\alias{depmixS4}
+
+\docType{package}
+\title{
+depmixS4 provides classes for fitting hidden Markov models
+}
+\description{
+depmixS4 fits hidden Markov models on (multiple) sets of observations by the use
+of either EM or direct optimization of the log-likelihood; the latter is used to
+incorporate general linear constraints into models. The response densities for 
+each state may be chosen from the GLM family, or a multinomial. User defined 
+response densities are easy to add.
+}
+\details{
+\tabular{ll}{
+Package: \tab depmixS4\cr
+Type: \tab Package\cr
+Version: \tab 0.2\cr
+Date: \tab 2008-06-09\cr
+License: \tab GPL\cr
+}
+
+Model fitting is done in two steps; first, models are specified through the
+depmix function, which uses standard arguments to eg specify GLM densities
+for the responses; second, the model is fitted; the fit function is used to 
+provide extra arguments concerning the optimization, such as providing 
+constraints on parameters. 
+
+}
+\author{
+Ingmar Visser & Maarten Speekenbrink
+Maintainer: i.visser at uva.nl
+}
+\references{
+
+On hidden Markov models: Lawrence R. Rabiner (1989).  A tutorial on
+hidden Markov models and selected applications in speech recognition.
+\emph{Proceedings of IEEE}, 77-2, p.  267-295.
+
+On latent class models: A. L. McCutcheon (1987).  \emph{Latent class
+analysis}.  Sage Publications.
+
+}
+\keyword{ package }
+\seealso{
+\code{\link[<depmixS4>:<depmixS4>-package]{depmix}}
+}
+\examples{
+# These should be added at some point ...
+}
\ No newline at end of file

Added: trunk/man/posterior.Rd
===================================================================
--- trunk/man/posterior.Rd	                        (rev 0)
+++ trunk/man/posterior.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -0,0 +1,48 @@
+\name{posterior}
+
+\alias{posterior}
+
+\alias{posterior,depmix.fitted-method}
+
+\title{ Posterior states/classes }
+
+\description{
+
+	Compute the posterior states for a (fitted) depmix object.  In the case
+	of a latent class or mixture model these are the class probabilities.
+
+}
+
+\usage{
+	\S4method{posterior}{depmix.fitted}(object,...)
+}
+
+\arguments{
+  \item{object}{A depmix object.}
+  \item{\dots}{Not currently used.}
+}
+
+\value{
+
+	\item{posterior}{: Returns a data.frame with nstates(object) + 1
+	columns; the first column has the viterbi states, the other columns
+	have the delta probabilities, see Rabiner (1989).}
+
+}
+
+\references{ 	
+
+	Lawrence R. Rabiner (1989).  A tutorial on hidden Markov models and
+	selected applications in speech recognition.  \emph{Proceedings of
+	IEEE}, 77-2, p.  267-295. 
+
+}
+
+\author{ Ingmar Visser }
+
+\examples{
+	# add some later
+}
+
+\keyword{ methods }
+

Modified: trunk/man/response-classes.Rd
===================================================================
--- trunk/man/response-classes.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/response-classes.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -7,7 +7,7 @@
 \alias{GLMresponse-class}
 \alias{transInit-class}
 
-\title{Class "GLmresponse" and class "transInit"}
+\title{Class "GLMresponse" and class "transInit"}
 
 \description{Specific instances of response models for \code{\link{depmix}}
 models.}
@@ -55,4 +55,4 @@
 
 \author{Ingmar Visser}
 
-\keyword{classes}
+\keyword{ methods }

Modified: trunk/man/response.Rd
===================================================================
--- trunk/man/response.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/response.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -77,7 +77,7 @@
 	
 	\code{getdf} returns the number of free parameters of a
 	\code{response} model.
-
+	
 }
 
 \author{Ingmar Visser} 

Modified: trunk/man/simulate.Rd
===================================================================
--- trunk/man/simulate.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/simulate.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -1,7 +1,11 @@
-\name{simulate,depmix-method}
+\name{simulate}
 
 \docType{method}
 
+\alias{simulate}
+
+\alias{simulate,response-method}
+\alias{simulate,depmix-method}
 \alias{simulate,GLMresponse-method}
 \alias{simulate,transInit-method}
 
@@ -9,46 +13,58 @@
 
 \description{
 
-Random draws from \code{depmix} objects.
+	Random draws from \code{depmix} objects.
 
 }
 
 \usage{
-  \S4method{simulate}{depmix}(object)
-  \S4method{simulate}{response}(object)
+
+    \S4method{simulate}{depmix}(object, nsim=1, seed=NULL, times=NULL, ...)
+    
+	\S4method{simulate}{response}(object)
+	
 	\S4method{simulate}{GLMresponse}(object)
+	
 	\S4method{simulate}{transInit}(object)
 }
 
 \arguments{
-	\item{object}{Object to generate random draws. An object of class \code{depmix}, \code{response}, \code{transInit}}
-	\item{nsim}{The number of draws.}
+	
+	\item{object}{Object to generate random draws.  An object of class
+	\code{depmix}, \code{response}, \code{transInit}}
+
+	\item{nsim}{The number of draws (one draw simulates a data set of the
+	size that is defined by ntimes); defaults to 1.}
+	
 	\item{seed}{Set the seed.}
-	\item{times}{An indicator vector indicating for which times in the complete
-      series to generate the data. For internal use.}
+	
+	\item{times}{An indicator vector indicating for which times in the
+	complete series to generate the data.  For internal use.}
+	
 	\item{...}{Not used currently.}
 }
 
 \details{
 
-  For a \code{depmix} model, simulate generates \code{nsim} random state
-  sequences, each of the same length as the observation sequence in the
-  \code{depmix} model (i.e., \code{sum(ntimes(object))}. The state sequences
-  are then used to generate \code{nsim} observation sequences of thee same
-  length.
-  
-  Setting the \code{times} option selects the time points in the total
-  state/observation sequence (i.e., counting is continued over ntimes).
-  Usage of the \code{times} option is not recommended.
+	For a \code{depmix} model, simulate generates \code{nsim} random state
+	sequences, each of the same length as the observation sequence in the
+	\code{depmix} model (i.e., \code{sum(ntimes(object))}.  The state
+	sequences are then used to generate \code{nsim} observation sequences
+	of thee same length.
 
+	Setting the \code{times} option selects the time points in the total
+	state/observation sequence (i.e., counting is continued over ntimes).
+	Usage of the \code{times} option is not recommended.
+
 }
 
 \value{
 
 	For a \code{depmix} object, a \code{list} with two elements;
-  \code{states}, an N*nsim matrix with a state sequence in each column,
-  and \code{responses}, an N*nobs*nsim array with observation sequences, where
-  N = \code{sum(ntimes(object))}
+	\code{states}, an N*nsim matrix with a state sequence in each column,
+	and \code{responses}, an N*nobs*nsim array with observation sequences,
+	where N = \code{sum(ntimes(object))} 
+
 }
 
 \author{Maarten Speekenbrink}

Modified: trunk/man/speed.Rd
===================================================================
--- trunk/man/speed.Rd	2008-06-09 13:08:25 UTC (rev 140)
+++ trunk/man/speed.Rd	2008-06-09 14:22:51 UTC (rev 141)
@@ -23,7 +23,14 @@
 
 \usage{data(speed)}
 
-\format{Data.frame}
+\format{
+  A data frame with 439 observations on the following 3 variables.
+  \describe{
+	\item{\code{rt}}{a numeric vector}
+	\item{\code{corr}}{a numeric vector}
+	\item{\code{Pacc}}{a numeric vector}
+  }
+}
 
 \source{
 
@@ -33,4 +40,9 @@
 
 }
 
+\examples{
+data(speed)
+## maybe str(speed) ; plot(speed) ...
+}
+
 \keyword{datasets}



More information about the depmix-commits mailing list