[Depmix-commits] r423 - papers/jss

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 1 00:20:39 CEST 2010


Author: ingmarvisser
Date: 2010-07-01 00:20:39 +0200 (Thu, 01 Jul 2010)
New Revision: 423

Modified:
   papers/jss/dpx4.sh
   papers/jss/dpx4Rev.Rnw
Log:
Minor edits to conform to jss standards

Modified: papers/jss/dpx4.sh
===================================================================
--- papers/jss/dpx4.sh	2010-06-30 15:12:37 UTC (rev 422)
+++ papers/jss/dpx4.sh	2010-06-30 22:20:39 UTC (rev 423)
@@ -4,7 +4,7 @@
 
 R --vanilla < dpx4Sweave.R ;
 
-R --vanilla < dpx4SweaveNoEval.R ;
+# R --vanilla < dpx4SweaveNoEval.R ;
 
 R --vanilla < dpx4Stangle.R ;
 
@@ -22,7 +22,9 @@
 
 
 
+# R CMD Sweave file.Rnw
 
 
 
 
+

Modified: papers/jss/dpx4Rev.Rnw
===================================================================
--- papers/jss/dpx4Rev.Rnw	2010-06-30 15:12:37 UTC (rev 422)
+++ papers/jss/dpx4Rev.Rnw	2010-06-30 22:20:39 UTC (rev 423)
@@ -94,14 +94,14 @@
 
 \begin{document}
 
-
 %set width of figures produced by Sweave
 \setkeys{Gin}{width=0.9\textwidth}
 
 \maketitle
 
-<<echo=FALSE>>=	
+<<echo=FALSE,results=hide>>=	
 .Options$digits<-3
+options(continue="+	",width=70,useFancyQuotes=FALSE)
 library(depmixS4)
 @
 
@@ -184,7 +184,7 @@
 \citet{Dutilh2010}, and in the next section a number of example models
 for these data is described.
 
-\begin{figure}[htbp]
+\begin{figure}[!Htbp]
 \begin{center}
 <<fig=TRUE,echo=FALSE,height=5,width=7,eps=FALSE>>=	
 data(speed)
@@ -308,7 +308,7 @@
 
 Parameters are estimated in \pkg{depmixS4} using the EM algorithm or
 through the use of a general Newton-Raphson optimizer.  In the EM
-algorithm, parameters are estimated by iteratively maximising the
+algorithm, parameters are estimated by iteratively maximizing the
 expected joint log-likelihood of the parameters given the observations and
 states.  Let $\greekv{\theta} = (\greekv{\theta}_1,
 \greekv{\theta}_2,\greekv{\theta}_3)$ be the general parameter vector
@@ -344,15 +344,15 @@
 j|\vc{O}_{1:T}, \vc{z}_{1:T},\greekv{\theta}')$ and $\gamma_t(j) =
 P(S_t = j|\vc{O}_{1:T}, \vc{z}_{1:T},\greekv{\theta}')$ can be
 computed effectively by the forward-backward algorithm \citep[see
-e.g.,][]{Rabiner1989}.  The Maximisation step consists of the
-maximisation of (\ref{eq:Q}) for $\greekv{\theta}$.  As the right hand
-side of (\ref{eq:Q}) consists of three separate parts, we can maximise
+e.g.,][]{Rabiner1989}.  The Maximization step consists of the
+maximization of (\ref{eq:Q}) for $\greekv{\theta}$.  As the right hand
+side of (\ref{eq:Q}) consists of three separate parts, we can maximize
 separately for $\greekv{\theta}_1$, $\greekv{\theta}_2$ and
-$\greekv{\theta}_3$.  In common models, maximisation for
+$\greekv{\theta}_3$.  In common models, maximization for
 $\greekv{\theta}_1$ and $\greekv{\theta}_2$ is performed by the
 \code{nnet.default} routine in the \pkg{nnet} package
-\citep{Venables2002}, and maximisation for $\greekv{\theta}_3$ by the
-standard \code{glm} routine.  Note that for the latter maximisation,
+\citep{Venables2002}, and maximization for $\greekv{\theta}_3$ by the
+standard \code{glm} routine.  Note that for the latter maximization,
 the expected values $\gamma_t(j)$ are used as prior weights of the
 observations $O^k_t$.
 
@@ -577,8 +577,8 @@
 <<>>=
 set.seed(1)
 mod <- depmix(list(rt~1,corr~1), data=speed, nstates=2, 
-    family=list(gaussian(),multinomial("identity")),
-    transition=~scale(Pacc),instart=runif(2))
+    family=list(gaussian(), multinomial("identity")),
+		transition=~scale(Pacc),instart=runif(2))
 fm <- fit(mod,verbose=FALSE)
 @
 
@@ -699,12 +699,12 @@
 published in \citet{Jansen2002}.  Before specifying specifying a model
 for these data, we briefly describe them.
 
-The balance scale taks is a famous task for testing cognitive
+The balance scale task is a famous task for testing cognitive
 strategies developed by Jean Piaget \citep[see][]{Siegler1981}.
 Figure~\ref{fig:balance} provides an example of a balance scale item.
 Participants' task is to say to which side the balance will tip when
 released, or alternatively, whether it will stay in balance.  The item
-shown in Figure~\ref{fig:balance} is a so-callled distance item: the
+shown in Figure~\ref{fig:balance} is a so-called distance item: the
 number of weights placed on each side is equal, and only the distance
 of the weights to the fulcrum differs between each side.
 
@@ -834,7 +834,7 @@
 \begin{enumerate}
 	\item y: the response variable
 	\item x: the design matrix, possibly only an intercept
-	\item paramaters: a named list with the coefficients and possibly 
+	\item parameters: a named list with the coefficients and possibly 
 	other parameters (e.g., the standard deviation in the Gaussian 
 	response model)
 	\item fixed: a vector of logicals indicating whether parameters are 
@@ -966,8 +966,8 @@
     y <- object at y
     fit <- gamlss(y~1,weights=w,family=exGAUS(),
       control=gamlss.control(n.cyc=100,trace=FALSE),
-      mu.start=object at parameters$mu,
-      sigma.start=exp(object at parameters$sigma),
+      mu.start=object at parameters$mu, 
+      sigma.start=exp(object at parameters$sigma), 
       nu.start=exp(object at parameters$nu))
     pars <- c(fit$mu.coefficients,fit$sigma.coefficients,fit$nu.coefficients)
     object <- setpars(object,pars)
@@ -1051,7 +1051,7 @@
 (NEST).  Maarten Speekenbrink was supported by ESRC grant
 RES-062-23-1511 and the ESRC Centre for Economic Learning and Social
 Evolution (ELSE).  Han van der Maas provided the speed-accuracy data
-\citep{Dutilh2010} and thereby neccessitated implementing models with
+\citep{Dutilh2010} and thereby necessitated implementing models with
 time-dependent covariates.  Brenda Jansen provided the balance scale
 data set \citep{Jansen2002} which was the perfect opportunity to test
 the covariates on the prior model parameters.  The examples in the



More information about the depmix-commits mailing list