[Depmix-commits] r332 - trunk/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 29 15:15:29 CET 2010


Author: ingmarvisser
Date: 2010-01-29 15:15:29 +0100 (Fri, 29 Jan 2010)
New Revision: 332

Modified:
   trunk/man/balance.Rd
   trunk/man/depmix-internal.Rd
   trunk/man/depmix-methods.Rd
   trunk/man/depmix.Rd
   trunk/man/makeDepmix.Rd
   trunk/man/mix.Rd
   trunk/man/response-class.Rd
   trunk/man/response-classes.Rd
   trunk/man/responses.Rd
   trunk/man/speed.Rd
Log:
Help file updates: links, refs, structure et cetera.

Modified: trunk/man/balance.Rd
===================================================================
--- trunk/man/balance.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/balance.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -6,35 +6,39 @@
 
 \title{Balance Scale Data}
 
-\description{Balance scale data of four distance items from 779 subjects;
-participants' ages are included.}
+\description{Balance scale data of four distance items from 779 participants;
+participants ages are included.}
 
 \usage{data(balance)}
 
 \format{
   
-  A data frame with 779 observations on the following variables.
-
-  \describe{
-	\item{\code{sex}}{Participants' sex.}
-	\item{\code{agedays}}{Age in days.}
-	\item{\code{age}}{Age in years.}
-	\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.}
-  }
+	A data frame with 779 observations on the following variables. The full 
+	dataset is described and analyzed extensively in 
+	Jansen & Van der Maas (2002). The trichotomous data are left, balance, right. 
+	The dichotomous version of the data is scored correct, incorrect. 
+  
+  	\describe{
+		\item{\code{sex}}{Participants sex.}
+		\item{\code{agedays}}{Age in days.}
+		\item{\code{age}}{Age in years.}
+		\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.}
+	}
+	
 }
 
 \source{
 
-	Brenda Jansen (2001),\emph{Development of reasoning on the balance
-	scale task: Psychometric assessment of cognitive strategies}.  PhD
-	thesis, University of Amsterdam, Department of Psychology.
+	Brenda Jansen & Han van der Maas (2002). The development of
+	children's rule use on the balance scale task. \emph{Journal 
+	of experimental Child Psychology, 81}, p. 383-416.
 
 }
 

Modified: trunk/man/depmix-internal.Rd
===================================================================
--- trunk/man/depmix-internal.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/depmix-internal.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -36,6 +36,7 @@
 \alias{fit,GLMresponse-method}
 \alias{fit,BINOMresponse-method}
 \alias{fit,NORMresponse-method}
+
 \alias{fit,MULTINOMresponse-method}
 \alias{fit,MVNresponse-method}
 \alias{fit,transInit-method}
@@ -45,8 +46,10 @@
 \alias{predict,GLMresponse-method}
 \alias{predict,BINOMresponse-method}
 \alias{predict,NORMresponse-method}
+
 \alias{predict,MULTINOMresponse-method}
 \alias{predict,transInit-method}
+\alias{predict,MVNresponse-method}
 
 \alias{getpars,GLMresponse-method}
 \alias{setpars,GLMresponse-method}
@@ -56,6 +59,9 @@
 
 \alias{npar,response-method}
 
+\alias{MVNresponse,formula-method}
+
+
 \title{DepmixS4 internal functions}
 
 \description{

Modified: trunk/man/depmix-methods.Rd
===================================================================
--- trunk/man/depmix-methods.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/depmix-methods.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -74,8 +74,7 @@
   through the \code{\link{forwardbackward}} function.} 
 
   \item{which}{The default "pars" returns a vector of all parameters of a
-	  
-  \code{depmix} object; the alternative value "fixed" return a logical
+  \code{depmix} object; the alternative value "fixed" returns 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
@@ -95,7 +94,7 @@
 
 	\item{npar}{returns the number of paramters of a model.}
 
-	\item{freepars}{returns the number of non-fixed parameters.}
+	\item{freepars}{returns the number of non-redundant parameters.}
 
 	\item{setpars}{returns a \code{(dep-)mix} object with new parameter values.}
 

Modified: trunk/man/depmix.Rd
===================================================================
--- trunk/man/depmix.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/depmix.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -26,7 +26,7 @@
 	
 	depmix(response, data=NULL, nstates, transition=~1, family=gaussian(), 
 		prior=~1, initdata=NULL, respstart=NULL, trstart=NULL, instart=NULL,
-		ntimes=NULL,...)	
+		ntimes=NULL,...)
 	
 }
 
@@ -45,14 +45,15 @@
 		transitions. See 'Details'.}
 	
 	\item{family}{A family argument for the response. This must be a list
-		of family's if the response is multivariate.}
+		of \code{family}'s if the response is multivariate.}
 	
 	\item{prior}{A one-sided formula specifying the density for the prior
 		or initial state probabilities.}
 	
 	\item{initdata}{An optional data.frame to interpret the variables
-		occuring in prior. The number of rows of this data.frame must be
-		equal to the number of cases being modeled. See 'Details'.}
+		occuring in \code{prior}.  The number of rows of this data.frame
+		must be equal to the number of cases being modeled,
+		\code{length(ntimes)}.  See 'Details'.}
 	
 	\item{respstart}{Starting values for the parameters of the response
 		models.}
@@ -63,10 +64,11 @@
 	\item{instart}{Starting values for the parameters of the prior or
 		initial state probability model.}
 
-	\item{ntimes}{A vector specifying the lengths of individual, ie
+	\item{ntimes}{A vector specifying the lengths of individual, i.e.
 		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.}
+		assumed to form a single time series, i.e. \code{ntimes=nrow(data)}.
+		If the \code{data} argument has an attribute ntimes, then this 
+		is used.}
 		
 	\item{...}{Not used currently.}
 		
@@ -78,21 +80,31 @@
 	which needs to be fitted using \code{\link{fit}} to optimize the
 	parameters.
 	
-	The response model(s) are by default created by call(s) to 
-	\code{\link{GLMresponse}} providing the response formula and the 
-	family specifying the error distribution.  If response is a list of 
-	formulae, the \code{response}'s are assumed to be independent 
-	conditional on the latent state.
+	The response model(s) are by default created by call(s) to
+	\code{GLMresponse} using the \code{formula} and the \code{family}
+	arguments, the latter specifying the error distribution.  See
+	\code{\link{GLMresponse}} for possible values of the \code{family}
+	argument for \code{glm}-type responses (ie a subset of the \code{glm}
+	family options, and the multinomial).  Alternative response
+	distributions are specified by using the \code{\link{makeDepmix}}
+	function.  Its help page has examples of specifying a model with a
+	multivariate normal response, as well as an example of adding a
+	user-defined response model, in this case for the ex-gauss
+	distribution.
 	
+	If \code{response} is a list of formulae, the \code{response}'s are
+	assumed to be independent conditional on the latent state.
+	
 	The transitions are modeled as a multinomial logistic model for each
-	state.  Hence, the transition matrix can be modeled as time-dependent,
-	depending on predictors.  The prior density is also modeled as a
-	multinomial logistic.  Both of these models are created by calls to
+	state.  Hence, the transition matrix can be modeled using time-varying
+	covariates.  The prior density is also modeled as a multinomial
+	logistic.  Both of these models are created by calls to
 	\code{\link{transInit}}.
 	
-	Starting values may be provided by the respective arguments.  The order
-	in which parameters must be provided can be easily studied by using the
-	\code{\link{setpars}} and \code{\link{getpars}} functions.
+	Starting values the initial, transition, and response models may be
+	provided by their respective arguments.  The order in which parameters
+	must be provided can be easily studied by using the
+	\code{\link{setpars}} and \code{\link{getpars}} functions. 
 	
 	Linear constraints on parameters can be provided as argument to the
 	\code{\link{fit}} function.
@@ -148,12 +160,14 @@
 
 \seealso{
 
-	\code{\link{fit}}, \code{\link{transInit}}, \code{\link{response}},
+	\code{\link{fit}}, \code{\link{transInit}}, \code{\link{GLMresponse}},
 	\code{\link{depmix-methods}} for accessor functions to \code{depmix}
 	objects. 	
 	
-	For full control check the \code{\link{makeDepmix}} help page and its
-	example section for the possibility to add new response distributions.
+	For full control see the \code{\link{makeDepmix}} help page and its
+	example section for the possibility to add user-defined response
+	distributions. 
+
 }
 
 \references{

Modified: trunk/man/makeDepmix.Rd
===================================================================
--- trunk/man/makeDepmix.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/makeDepmix.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -27,13 +27,12 @@
 
 \arguments{
 	
-	\item{response}{A two-dimensional list of response models. See
-	'Details'.}
+	\item{response}{A two-dimensional list of response models.  See
+		'Details'.}
 	
-	\item{transition}{A list of transition models, each created by a call
-	to \code{\link{transInit}} on for possibilities of specifying such
-	models.  The lenght of this list should be the nubmer of states of the
-	model.}
+	\item{transition}{A list of transition models, each created by a
+		call to \code{\link{transInit}}.  The lenght of this list should be
+		the nubmer of states of the model.}
 	
 	\item{prior}{The initial state probabilities model; created through a
 	call to \code{\link{transInit}}.}
@@ -52,22 +51,22 @@
 
 \details{ 
 
-	The function \code{makeDepmix} creates an S4 object of class \code{depmix},
-	which needs to be fitted using \code{\link{fit}} to optimize the
-	parameters. This function is provided to have full control, eg by
-	specifying one's own response models with distributions that are not
-	provided. 
+	The function \code{makeDepmix} creates an S4 object of class
+	\code{depmix}, which needs to be fitted using \code{\link{fit}} to
+	optimize the parameters.  This function is provided to have full
+	control, eg by specifying one's own response models with distributions
+	that are not provided.
 	
 	The response model(s) should be created by call(s) to
-	\code{\link{response}} or one's own created response models that should
-	extend the response class and have the following methods: dens, predict
-	and optionally fit.  The fit function should have an argument w,
-	providing the weights.  If the fit function is not provided,
+	\code{\link{GLMresponse}}, \code{MVNresponse} (see example below) or
+	user-defined response models (see example below) that should extend the
+	\code{\link{response-class}} and have the following methods: dens,
+	predict and optionally fit.  The fit function should have an argument
+	w, providing the weights.  If the fit function is not provided,
 	optimization should be done by using Rdonlp (use method="donlp" in
-	calling fit on the depmix model, this is currently not done
-	automatically).  The first index of response models runs over the
-	states of the model, and the seconde index over the responses to be
-	modeled.
+	calling fit on the depmix model, note that this is \emph{not} the default).
+	The first index of response models runs over the states of the model,
+	and the second index over the responses to be modeled.
 	
 }
 
@@ -82,7 +81,7 @@
 
 \seealso{
 
-	\code{\link{fit}}, \code{\link{transInit}}, \code{\link{response}},
+	\code{\link{fit}}, \code{\link{transInit}}, \code{\link{GLMresponse}},
 	\code{\link{depmix-methods}} for accessor functions to \code{depmix}
 	objects.
 

Modified: trunk/man/mix.Rd
===================================================================
--- trunk/man/mix.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/mix.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -65,17 +65,27 @@
 	which needs to be fitted using \code{\link{fit}} to optimize the
 	parameters.
 	
-	The response model(s) are created by call(s) to \code{\link{response}}
-	providing the response formula and the family specifying the error
-	distribution.  If response is a list of formulae, the \code{response}'s
-	are assumed to be independent conditional on the latent class.
+	The response model(s) are by default created by call(s) to
+	\code{GLMresponse} using the \code{formula} and the \code{family}
+	arguments, the latter specifying the error distribution.  See
+	\code{\link{GLMresponse}} for possible values of the \code{family}
+	argument for \code{glm}-type responses (ie a subset of the \code{glm}
+	family options, and the multinomial).  Alternative response
+	distributions are specified by using the \code{\link{makeDepmix}}
+	function.  Its help page has examples of specifying a model with a
+	multivariate normal response, as well as an example of adding a
+	user-defined response model, in this case for the ex-gauss
+	distribution.
 	
+	If \code{response} is a list of formulae, the \code{response}'s are
+	assumed to be independent conditional on the latent state.
+	
 	The prior density is modeled as a multinomial logistic.  This model is
 	created by a call to \code{\link{transInit}}.
 	
 	Starting values may be provided by the respective arguments.  The order
 	in which parameters must be provided can be easily studied by using the
-	\code{\link{setpars}} function.
+	\code{\link{setpars}} and \code{\link{getpars}} functions.
 	
 	Linear constraints on parameters can be provided as argument to the
 	\code{\link{fit}} function.
@@ -118,7 +128,7 @@
 
 \seealso{
 
-	\code{\link{fit}}, \code{\link{transInit}}, \code{\link{response}},
+	\code{\link{fit}}, \code{\link{transInit}}, \code{\link{GLMresponse}},
 	\code{\link{depmix-methods}} for accessor functions to \code{depmix}
 	objects.
 

Modified: trunk/man/response-class.Rd
===================================================================
--- trunk/man/response-class.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/response-class.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -8,7 +8,7 @@
 
 \description{
 
-A generic \code{\link{response}} model for \code{\link{depmix}} models.
+A generic \code{response} model for \code{\link{depmix}} models.
 
 }
 

Modified: trunk/man/response-classes.Rd
===================================================================
--- trunk/man/response-classes.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/response-classes.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -24,7 +24,7 @@
 		\item{\code{formula}:}{A formula that specifies the model.}
 
 		\item{\code{family}:}{A family object specifying the link 
-		function. See the \code{\link{response}} help page for 
+		function. See the \code{\link{GLMresponse}} help page for 
 		possible options.}
 	}
 	

Modified: trunk/man/responses.Rd
===================================================================
--- trunk/man/responses.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/responses.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -148,7 +148,6 @@
 	fm <- fit(mod)
 	cat("Test gaussian fit: ", all.equal(getpars(fm),c(mean(y),sd(y)),check=FALSE))
 	
-	
 	# poisson response model
 	x <- abs(rnorm(1000,2))
 	res <- rpois(1000,x)

Modified: trunk/man/speed.Rd
===================================================================
--- trunk/man/speed.Rd	2010-01-29 14:14:48 UTC (rev 331)
+++ trunk/man/speed.Rd	2010-01-29 14:15:29 UTC (rev 332)
@@ -8,16 +8,16 @@
 
 \description{
 
-	This data set is a bivariate series of reaction times and accuracy
-	scores of a single subject switching between slow and accurate
+	This data set is a bivariate series of response times and accuracy
+	scores of a single participant switching between slow/accurate
 	responding and fast guessing on a lexical decision task.  The slow and
 	accurate responding, and the fast guessing can be modelled using two
 	states, with a switching regime between them.  The dataset further
 	contains a third variable called Pacc, representing the relative
 	pay-off for accurate responding, which is on a scale of zero to one.
 	The value of Pacc was varied during the experiment to induce the
-	switching.  This data set is a from a single subject from experiment 2
-	in \cite{Van der Maas et al, 2005}.
+	switching.  This data set is a from participant X in experiment 
+	Y from Dutilh et al submitted). 
 	
 }
 
@@ -26,18 +26,20 @@
 \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}
+	\item{\code{rt}}{a numeric vector of response times}
+	\item{\code{corr}}{a numeric vector of accuracy (0/1)}
+	\item{\code{Pacc}}{a numeric vector of the pay-off for accuracy}
   }
 }
 
 \source{
+	
+	Gilles Dutilh, Ingmar Visser, Eric-Jan Wagenmakers, & Han L. J. van der Maas.
+	A Phase Transition Model for the Speed-Accuracy Trade-Off in 
+	Response Time Experiments. \emph{submitted for publication.}
 
-	Han L. J. Van der Maas, Conor V. Dolan and Peter C. M. Molenaar (2007),
-	Phase Transitions in the Trade-Off between Speed and Accuracy in Choice
-	Reaction Time Tasks.  \emph{Manuscript in preparation}. 
-
+	Please contact g.dutilh at uva.nl for preprints and more information. 
+	
 }
 
 \examples{



More information about the depmix-commits mailing list