[Depmix-commits] r286 - papers/vignette
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jul 8 16:58:56 CEST 2009
Author: ingmarvisser
Date: 2009-07-08 16:58:56 +0200 (Wed, 08 Jul 2009)
New Revision: 286
Removed:
papers/vignette/depmix-intro.aux
papers/vignette/depmix-intro.log
papers/vignette/depmix-intro.pdf
papers/vignette/depmix-intro.tex
papers/vignette/depmix-intro.toc
Log:
Removed vignette files.
Deleted: papers/vignette/depmix-intro.aux
===================================================================
--- papers/vignette/depmix-intro.aux 2009-07-08 14:57:02 UTC (rev 285)
+++ papers/vignette/depmix-intro.aux 2009-07-08 14:58:56 UTC (rev 286)
@@ -1,41 +0,0 @@
-\relax
-\bibstyle{plainnat}
-\citation{R2007}
-\citation{Wickens1982}
-\citation{Schmittmann2006}
-\citation{Kim1994}
-\citation{Ghysels1994}
-\citation{Rabiner1989}
-\citation{Rainer2000}
-\citation{Krogh1998}
-\citation{Pol1996}
-\citation{Vermunt2003}
-\citation{Maas2005b}
-\citation{Jansen2001}
-\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{3}}
-\citation{Pol1996}
-\@writefile{toc}{\contentsline {section}{\numberline {2}Dependent mixture models}{4}}
-\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Reaction times, accuracy and pay-off values for the first series of responses in dataset \texttt {speed}.}}{4}}
-\newlabel{fig:speed}{{1}{4}}
-\citation{Baum1966}
-\citation{Rabiner1989}
-\citation{Lystig2002}
-\citation{Lystig2002}
-\citation{Tamura2007}
-\citation{Spellucci2002}
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Likelihood}{5}}
-\newlabel{condLike}{{1}{5}}
-\newlabel{eq:condLogl}{{2}{5}}
-\newlabel{eq:fwd1}{{3}{5}}
-\newlabel{eq:fwdt}{{4}{5}}
-\newlabel{eq:logl}{{5}{5}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Computational considerations}{5}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Parameter estimation}{5}}
-\@writefile{toc}{\contentsline {section}{\numberline {3}Using depmixS4}{6}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Example data: speed}{6}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Defining models}{6}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Transition matrix and initial state probabilities}{7}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Fitting models}{7}}
-\bibdata{all,ingmar}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.5}Fixing and constraining parameters}{8}}
-\@writefile{toc}{\contentsline {paragraph}{Parameter numbering}{8}}
Deleted: papers/vignette/depmix-intro.log
===================================================================
--- papers/vignette/depmix-intro.log 2009-07-08 14:57:02 UTC (rev 285)
+++ papers/vignette/depmix-intro.log 2009-07-08 14:58:56 UTC (rev 286)
@@ -1,360 +0,0 @@
-This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (format=pdflatex 2009.2.13) 2 JUL 2009 13:23
-entering extended mode
-\write18 enabled.
- %&-line parsing enabled.
-**depmix-intro.tex
-(./depmix-intro.tex
-LaTeX2e <2005/12/01>
-Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
-yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
-abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
-h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
-greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
-tin, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, r
-omanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turki
-sh, ukenglish, ukrainian, uppersorbian, welsh, loaded.
-(/usr/local/texlive/2008/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
-(/usr/local/texlive/2008/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsmath.sty
-Package: amsmath 2000/07/18 v2.13 AMS math features
-\@mathmargin=\skip43
-
-For additional information on amsmath, use the `?' option.
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amstext.sty
-Package: amstext 2000/06/29 v2.01
-
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsgen.sty
-File: amsgen.sty 1999/11/30 v2.0
-\@emptytoks=\toks14
-\ex@=\dimen103
-))
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsbsy.sty
-Package: amsbsy 1999/11/29 v1.2d
-\pmbraise@=\dimen104
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsopn.sty
-Package: amsopn 1999/12/14 v2.01 operator names
-)
-\inf at bad=\count87
-LaTeX Info: Redefining \frac on input line 211.
-\uproot@=\count88
-\leftroot@=\count89
-LaTeX Info: Redefining \overline on input line 307.
-\classnum@=\count90
-\DOTSCASE@=\count91
-LaTeX Info: Redefining \ldots on input line 379.
-LaTeX Info: Redefining \dots on input line 382.
-LaTeX Info: Redefining \cdots on input line 467.
-\Mathstrutbox@=\box26
-\strutbox@=\box27
-\big at size=\dimen105
-LaTeX Font Info: Redeclaring font encoding OML on input line 567.
-LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
-\macc at depth=\count92
-\c at MaxMatrixCols=\count93
-\dotsspace@=\muskip10
-\c at parentequation=\count94
-\dspbrk at lvl=\count95
-\tag at help=\toks15
-\row@=\count96
-\column@=\count97
-\maxfields@=\count98
-\andhelp@=\toks16
-\eqnshift@=\dimen106
-\alignsep@=\dimen107
-\tagshift@=\dimen108
-\tagwidth@=\dimen109
-\totwidth@=\dimen110
-\lineht@=\dimen111
-\@envbody=\toks17
-\multlinegap=\skip44
-\multlinetaggap=\skip45
-\mathdisplay at stack=\toks18
-LaTeX Info: Redefining \[ on input line 2666.
-LaTeX Info: Redefining \] on input line 2667.
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amsfonts.sty
-Package: amsfonts 2001/10/25 v2.2f
-\symAMSa=\mathgroup4
-\symAMSb=\mathgroup5
-LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
-(Font) U/euf/m/n --> U/euf/b/n on input line 132.
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amscls/amsthm.sty
-Package: amsthm 2004/08/06 v2.20
-\thm at style=\toks19
-\thm at bodyfont=\toks20
-\thm at headfont=\toks21
-\thm at notefont=\toks22
-\thm at headpunct=\toks23
-\thm at preskip=\skip46
-\thm at postskip=\skip47
-\thm at headsep=\skip48
-\dth at everypar=\toks24
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amssymb.sty
-Package: amssymb 2002/01/22 v2.2d
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/local/texlive/2008/texmf/tex/latex/config/graphics.cfg
-File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
-)
-Package graphics Info: Driver file: pdftex.def on input line 90.
-
-(/usr/local/texlive/2008/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2008/09/08 v0.04l Graphics/color for pdfTeX
-\Gread at gobject=\count99
-))
-(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks25
-)
-\Gin at req@height=\dimen112
-\Gin at req@width=\dimen113
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/epsfig.sty
-Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR)
-\epsfxsize=\dimen114
-\epsfysize=\dimen115
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/epstopdf.sty
-Package: epstopdf 2008/05/06 v1.7 Conversion with epstopdf on the fly (HO)
-
-(/usr/local/texlive/2008/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2007/09/09 v1.2 Providing info/warning/message (HO)
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2007/09/30 v1.0 Managing graphics extensions (HO)
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2007/10/18 v3.0 Keyval support for LaTeX options (HO)
-)
-(/usr/local/texlive/2008/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2007/12/12 v0.3 LuaTeX support for pdfTeX utility functions
- (HO)
-Package pdftexcmds Info: LuaTeX not detected on input line 139.
-)
-Package grfext Info: Graphics extension search list:
-(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext) \AppendGraphicsExtensions on input line 323.
-)
-(/usr/local/texlive/2008/texmf-dist/tex/latex/natbib/natbib.sty
-Package: natbib 2007/10/30 8.1 (PWD)
-\bibhang=\skip49
-\bibsep=\skip50
-LaTeX Info: Redefining \cite on input line 602.
-\c at NAT@ctr=\count100
-)
-No file depmix-intro.aux.
-\openout1 = `depmix-intro.aux'.
-
-LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 39.
-LaTeX Font Info: ... okay on input line 39.
-LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 39.
-LaTeX Font Info: ... okay on input line 39.
-LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 39.
-LaTeX Font Info: ... okay on input line 39.
-LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 39.
-LaTeX Font Info: ... okay on input line 39.
-LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 39.
-LaTeX Font Info: ... okay on input line 39.
-LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 39.
-LaTeX Font Info: ... okay on input line 39.
-(/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count101
-\scratchdimen=\dimen116
-\scratchbox=\box28
-\nofMPsegments=\count102
-\nofMParguments=\count103
-\everyMPshowfont=\toks26
-\MPscratchCnt=\count104
-\MPscratchDim=\dimen117
-\MPnumerator=\count105
-\everyMPtoPDFconversion=\toks27
-)
-LaTeX Font Info: Try loading font information for U+msa on input line 43.
- (/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsa.fd
-File: umsa.fd 2002/01/19 v2.2g AMS font definitions
-)
-LaTeX Font Info: Try loading font information for U+msb on input line 43.
-
-(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsb.fd
-File: umsb.fd 2002/01/19 v2.2g AMS font definitions
-)
-
-Package natbib Warning: Citation `R2007' on page 1 undefined on input line 49.
-
-[1
-
-{/usr/local/texlive/2008/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
-No file depmix-intro.toc.
-\tf at toc=\write3
-\openout3 = `depmix-intro.toc'.
-
-[2]
-
-Package natbib Warning: Citation `Wickens1982' on page 3 undefined on input lin
-e 69.
-
-
-Package natbib Warning: Citation `Schmittmann2006' on page 3 undefined on input
- line 70.
-
-
-Package natbib Warning: Citation `Kim1994' on page 3 undefined on input line 72
-.
-
-
-Package natbib Warning: Citation `Ghysels1994' on page 3 undefined on input lin
-e 72.
-
-
-Package natbib Warning: Citation `Rabiner1989' on page 3 undefined on input lin
-e 73.
-
-
-Package natbib Warning: Citation `Rainer2000' on page 3 undefined on input line
- 74.
-
-
-Package natbib Warning: Citation `Krogh1998' on page 3 undefined on input line
-74.
-
-
-Package natbib Warning: Citation `Pol1996' on page 3 undefined on input line 81
-.
-
-
-Package natbib Warning: Citation `Vermunt2003' on page 3 undefined on input lin
-e 82.
-
-
-Overfull \hbox (11.11171pt too wide) in paragraph at lines 89--91
-[]\OT1/cmr/m/n/10 to be able to han-dle pa-ram-e-ter es-ti-mates sub-ject to ge
-n-eral lin-ear (in)equality
- []
-
-
-Package natbib Warning: Citation `Maas2005b' on page 3 undefined on input line
-122.
-
-
-Package natbib Warning: Citation `Jansen2001' on page 3 undefined on input line
- 124.
-
-
-LaTeX Warning: Reference `fig:speed' on page 3 undefined on input line 147.
-
-[3] <speed1.pdf, id=24, 578.16pt x 361.35pt>
-File: speed1.pdf Graphic file (type pdf)
- <use speed1.pdf>
-Overfull \hbox (1.89867pt too wide) in paragraph at lines 151--153
- []
- []
-
-
-Package natbib Warning: Citation `Pol1996' on page 4 undefined on input line 16
-1.
-
-[4 <./speed1.pdf>]
-
-Package natbib Warning: Citation `Baum1966' on page 5 undefined on input line 1
-94.
-
-
-Package natbib Warning: Citation `Rabiner1989' on page 5 undefined on input lin
-e 194.
-
-
-Package natbib Warning: Citation `Lystig2002' on page 5 undefined on input line
- 195.
-
-
-Package natbib Warning: Citation `Lystig2002' on page 5 undefined on input line
- 217.
-
-
-LaTeX Warning: Reference `eq:condLogl' on page 5 undefined on input line 232.
-
-
-LaTeX Warning: Reference `eq:fwd1' on page 5 undefined on input line 240.
-
-
-LaTeX Warning: Reference `eq:fwdt' on page 5 undefined on input line 240.
-
-
-Package natbib Warning: Citation `Tamura2007' on page 5 undefined on input line
- 257.
-
-
-Package natbib Warning: Citation `Spellucci2002' on page 5 undefined on input l
-ine 257.
-
-[5] [6] [7]
-No file depmix-intro.bbl.
-
-Package natbib Warning: There were undefined citations.
-
-[8] (./depmix-intro.aux)
-
-LaTeX Warning: There were undefined references.
-
-
-LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
-
- )
-Here is how much of TeX's memory you used:
- 2369 strings out of 493876
- 29434 string characters out of 1150568
- 87987 words of memory out of 3000000
- 5617 multiletter control sequences out of 10000+50000
- 13073 words of font info for 51 fonts, out of 3000000 for 5000
- 714 hyphenation exceptions out of 8191
- 30i,14n,23p,223b,292s stack positions out of 5000i,500n,10000p,200000b,50000s
-</usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmbx10.pfb></usr/l
-ocal/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmbx12.pfb></usr/local/texl
-ive/2008/texmf-dist/fonts/type1/bluesky/cm/cmbx9.pfb></usr/local/texlive/2008/t
-exmf-dist/fonts/type1/bluesky/cm/cmex10.pfb></usr/local/texlive/2008/texmf-dist
-/fonts/type1/bluesky/cm/cmmi10.pfb></usr/local/texlive/2008/texmf-dist/fonts/ty
-pe1/bluesky/cm/cmmi7.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesk
-y/cm/cmr10.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr12
-.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr17.pfb></usr
-/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr7.pfb></usr/local/texl
-ive/2008/texmf-dist/fonts/type1/bluesky/cm/cmr8.pfb></usr/local/texlive/2008/te
-xmf-dist/fonts/type1/bluesky/cm/cmr9.pfb></usr/local/texlive/2008/texmf-dist/fo
-nts/type1/bluesky/cm/cmsy10.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1
-/bluesky/cm/cmsy6.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/c
-m/cmsy7.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmsy8.pf
-b></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmtt10.pfb></usr/l
-ocal/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmtt9.pfb>
-Output written on depmix-intro.pdf (8 pages, 138233 bytes).
-PDF statistics:
- 109 PDF objects out of 1000 (max. 8388607)
- 0 named destinations out of 1000 (max. 131072)
- 12 words of extra memory for PDF output out of 10000 (max. 10000000)
-
Deleted: papers/vignette/depmix-intro.pdf
===================================================================
(Binary files differ)
Deleted: papers/vignette/depmix-intro.tex
===================================================================
--- papers/vignette/depmix-intro.tex 2009-07-08 14:57:02 UTC (rev 285)
+++ papers/vignette/depmix-intro.tex 2009-07-08 14:58:56 UTC (rev 286)
@@ -1,434 +0,0 @@
-\documentclass[a4paper]{article}
-
-\usepackage[]{amsmath, amsfonts, amstext, amsthm}
-
-\usepackage{amssymb}
-
-\usepackage[]{graphics}
-
-\usepackage{graphicx}
-
-\usepackage{epsfig}
-
-\usepackage{epstopdf}
-
-%\batchmode
-
-\usepackage[round]{natbib}
-
-\title{depmixS4: An R-package for fitting mixture models on mixed
-multivariate data with Markov dependencies}
-
-\author{Ingmar Visser \& Maarten Speekenbrink\thanks{
-Correspondence concerning this manual should be adressed to:
-Ingmar Visser, Department of Psychology, University of Amsterdam,
-Roetersstraat 15, 1018 WB, Amsterdam, The Netherlands}\\
-Department of Psychology, University of Amsterdam\\
-i.visser at uva.nl \\
-Department of Psychology, University College London
-\\ m.speekenbrink at ucl.ac.uk}
-
-\date{\today}
-
-\newcommand{\vc}{\mathbf}
-\newcommand{\mat}{\mathbf}
-
- \newcommand{\pkg}{\texttt}
- \newcommand{\code}{\texttt}
-
-\begin{document}
-
-\bibliographystyle{plainnat}
-
-\maketitle
-
-\begin{abstract}
-
- \pkg{depmixS4} implements a general framework for definining and
- fitting hidden Markov mixture model in the R programming language
- \citep{R2009}. This includes standard Markov models,
- latent/hidden Markov models, and latent class and finite mixture
- distribution models. The models can be fitted on mixed
- multivariate data with multinomial and/or gaussian distributions.
- Parameters can be estimated subject to general linear constraints.
- Parameter estimation is done through an EM algorithm or by a
- direct optimization approach with gradients using the
- \code{Rdonlp2} optimization routine when contraints are imposed on
- the parameters. A number of illustrative examples are included.
-
-\end{abstract}
-
-\newpage
-\tableofcontents
-\newpage
-
-\section{Introduction}
-
-Markov and latent Markov models are frequently used in the social
-sciences, in different areas and applications. In psychology, they
-are used for modelling learning processes, see \citet{Wickens1982},
-for an overview, and \citet{Schmittmann2006} for a recent application.
-In economics, latent Markov models are commonly used as regime
-switching models, see e.g.\ \citet{Kim1994} and \citet{Ghysels1994}.
-Further applications include speech recognition \citep{Rabiner1989},
-EEG analysis \citep{Rainer2000}, and genetics \citep{Krogh1998}. In
-those latter areas of application, latent Markov models are usually
-referred to as hidden Markov models.
-
-The \pkg{depmixS4} package was motivated by the fact that Markov models
-are used commonly in the social sciences, but no comprehensive package
-was available for fitting such models. Common programs for Markovian
-models include Panmark \citep{Pol1996}, and for latent class models
-Latent Gold \citep{Vermunt2003}. Those programs are lacking a number
-of important features, besides not being freely available. There are
-currently some packages in R that handle hidden Markov models but they
-lack a number of features that we needed in our research. In
-particular, \pkg{depmixS4} was designed to meet the following goals:
-\begin{enumerate}
-
- \item to be able to handle parameter estimates subject to general
- linear (in)equality constraints
-
- \item to be able to fit transition models with covariates, i.e.,
- to have time-dependent transition matrices
-
- \item to be able to include covariates in the prior or initial
- state probabilities of models
-
- \item to allow for easy extensibility, in particular, to be able
- to add new response distributions, both univariate and
- multivariate, and similarly to be able to allow for the addition
- of other transition models, e.g., continuous time observation
- models
-
-\end{enumerate}
-
-Although \pkg{depmixS4} is designed to deal with
-longitudinal or time series data, for say $T>100$, it can also handle
-the limit case with $T=1$. In those cases, there are no time
-dependencies between observed data, and the model reduces to a finite
-mixture model, or a latent class model. Although there are other
-specialized packages to deal with mixture data, one specific feature
-that we needed ourselves which is to the best of our knowledge not
-available in other packages is the possibility to include covariates
-on the prior probabilities of class membership. In the next section,
-an outline is provided of the model and the likelihood equations.
-
-\subsection*{Acknowledgements}
-
-Ingmar Visser was supported by an EC Framework 6 grant, project 516542
-(NEST). Maarten Speekenbrink was supported by the ESRC Centre for
-Economic Learning and Social Evolution (ELSE). Han van der Maas
-provided the speed-accuracy data \cite{Maas2005b} and thereby
-neccessitated implementing models with time-dependent covariates.
-Brenda Jansen provided the balance scale data set \citep{Jansen2001}
-which was the perfect opportunity to test the covariates on the prior
-model parameters. The examples in the help files use both of these
-data sets.
-
-% Maartje Raijmakers \cite{Raijmakers2001} provided
-% the discrimination data set.
-
-\section{Dependent mixture models}
-
-
-%Only later did I find out that \citet{Leroux1992} already
-%coined the term dependent mixture models in an application with hidden
-%Markov mixtures of Poisson count data.
-
-The data considered here, has the general form $O_{1}^{1}, \ldots,
-O_{1}^{m}$, $O_{2}^{1}, \ldots, O_{2}^{m}$, \ldots, $O_{T}^{1}, \ldots,
-O_{T}^{m}$ for an $m$-variate time series of length $T$. As an
-example, consider a time series of responses generated by a single
-subject in a reaction time experiment. The data consists of three
-variables, reaction time, accuracy and a covariate which is a pay-off
-factor which determines the reward for speed and accuracy. These
-variables are measured on 168, 134 and 137 occasions respectively
-(in Figure~\ref{fig:speed} the first part of this series is plotted).
-
-\begin{figure}[htbp]
- \begin{center}
- \scalebox{0.6}{\includegraphics*{speed1.pdf}}
- \caption{Reaction times, accuracy and pay-off values for
- the first series of responses in dataset \texttt{speed}.}
- \label{fig:speed}
- \end{center}
-\end{figure}
-
-The latent Markov model is commonly associated with data of this type,
-albeit usually only multinomial variables are considered. However,
-common estimation procedures, such as those implemented in
-\citet{Pol1996} are not suitable for long time series due to underflow
-problems. In contrast, the hidden Markov model is typically only used
-for `long' univariate time series. In the next section, the
-likelihood and estimation procedure for the hidden Markov model is
-described, given data of the above form. These models are called
-dependent mixture models because one of the authors (Ingmar Visser)
-thought it was time for a new name for these models.
-
-The dependent mixture model is defined by the following elements:
-\begin{enumerate}
-
- \item a set $\vc{S}$ of latent classes or states $S_{i},\, i=1,
- \ldots , n$,
-
- \item matrices $\mat{A}_t$ of transition probabilities $a_{ij,t}$ for
- the transition from state $S_{i}$ to state $S_{j}$ at time $t$,
-
- \item a set $\vc{B}_t$ of observation functions $b_j^k(\cdot)$ that
- provide the conditional probabilities of observations $O_{t}^k$
- associated with latent state $S_{j}$,
-
- \item a vector $\pmb{\pi}$ of latent state initial probabilities
- $\pi_{i}$
-\end{enumerate}
-When transitions are added to the latent class model, it is more
-appropriate to refer to the classes as states. The word class is
-rather more associated with a stable trait-like attribute whereas a
-state can change over time.
-
-
-\subsection{Likelihood}
-
-The log-likelihood of hidden Markov models is usually computed by the
-so-called forward-backward algorithm \citep{Baum1966,Rabiner1989}, or
-rather by the forward part of this algorithm. \cite{Lystig2002}
-changed the forward algorithm in such a way as to allow computing the
-gradients of the log-likelihood at the same time. They start by
-rewriting the likelihood as follows (for ease of exposition the
-dependence on the model parameters is dropped here):
-\begin{equation}
- L_{T} = Pr(\vc{O}_{1}, \ldots, \vc{O}_{T}) = \prod_{t=1}^{T}
-Pr(\vc{O}_{t}|\vc{O}_{1},
- \ldots, \vc{O}_{t-1}),
- \label{condLike}
-\end{equation}
-where $Pr(\vc{O}_{1}|\vc{O}_{0}):=Pr(\vc{O}_{1})$. Note that for a
-simple, i.e.\ observed, Markov chain these probabilities reduce to
-$Pr(\vc{O}_{t}|\vc{O}_{1},\ldots,
-\vc{O}_{t-1})=Pr(\vc{O}_{t}|\vc{O}_{t-1})$.
-The log-likelihood can now be expressed as:
-\begin{equation}
- l_{T} = \sum_{t=1}^{T} \log[Pr(\vc{O}_{t}|\vc{O}_{1}, \ldots,
-\vc{O}_{t-1})].
- \label{eq:condLogl}
-\end{equation}
-
-To compute the log-likelihood, \cite{Lystig2002} define the following
-(forward) recursion:
-\begin{align}
- \phi_{1}(j) &:= Pr(\vc{O}_{1}, S_{1}=j) = \pi_{j} b_{j}(\vc{O}_{1})
- \label{eq:fwd1} \\
-\begin{split}
- \phi_{t}(j) &:= Pr(\vc{O}_{t}, S_{t}=j|\vc{O}_{1}, \ldots,
-\vc{O}_{t-1}) \\
- &= \sum_{i=1}^{N} [\phi_{t-1}(i)a_{ij}b_{j}(\vc{O}_{t})] \times
-(\Phi_{t-1})^{-1},
- \label{eq:fwdt}
-\end{split}
-\end{align}
-where $\Phi_{t}=\sum_{i=1}^{N} \phi_{t}(i)$. Combining
-$\Phi_{t}=Pr(\vc{O}_{t}|\vc{O}_{1}, \ldots, \vc{O}_{t-1})$, and
-equation~(\ref{eq:condLogl}) gives the following expression for the
-log-likelihood:
-\begin{equation}
- l_{T} = \sum_{t=1}^{T} \log \Phi_{t}.
- \label{eq:logl}
-\end{equation}
-
-\subsection{Computational considerations} From
-equations~(\ref{eq:fwd1}--\ref{eq:fwdt}), it can be seen that
-computing the forward variables, and hence the log-likelihood, takes
-$O(Tn^{2})$ computations, for an $n$-state model and a time series of
-length $T$.
-
-\subsection{Parameter estimation}
-
-Parameters are estimated in \pkg{depmixS4} using the EM algorithm or
-through the use of a general Newton-Raphson optimizer. The EM
-algorithm however has some drawbacks. First, it can be slow to
-converge towards the end of optimization (although it is usually
-faster than direct optimization at the start, so possibly a
-combination of EM and direct optimization is fastest). Second,
-applying constraints to parameters can be problematic; in particular,
-EM can lead to wrong parameter estimates when applying constraints.
-Hence, in \pkg{depmixS4}, EM is used by default in unconstrained
-models, but otherwise, direct optimization is done using \pkg{Rdonlp2}
-\cite{Tamura2007,Spellucci2002}, because it handles general linear
-(in)equality constraints, and optionally also non-linear constraints.
-
-
-\section{Using depmixS4}
-
-Two steps are involved in using \pkg{depmixS4} which are illustrated
-below with examples:
-\begin{enumerate}
- \item model specification with function \code{depmix}
-
- \item model fitting with function \code{fit}
-\end{enumerate}
-
-\subsection{Example data: speed}
-
-Throughout this manual a data set called \code{speed} is used. It
-consists of three time series with three variables: reaction time,
-accuracy, and a covariate Pacc which defines the relative pay-off for
-speeded and accurate responding. The participant in this experiment
-switches between fast responding at chance level and relatively
-slower responding at a high level of accuracy.
-
-Interesting hypotheses to test are: is the switching regime symmetric?
-Is there evidence for two states or does one state suffice? Is the
-guessing state actually a guessing state, i.e., is the probability
-of a correct response at chance level (0.5)?
-
-
-\subsection{Defining models}
-
-A dependent mixture model is defined by the number of states, and by
-the response distribution functions, and can be created with the
-\code{depmix}-function as follows (see the help files for other
-options):
-
-\begin{verbatim}
-mod <- depmix(rt~1, data=speed, nstates=2)
-\end{verbatim}
-
-Above code illustrates the simplest case of a univariate time series
-without covariates; besides providing the data, the only other
-necessity is to specify the desired number of states. Note that the
-rt's are modelled here with a Gaussian distribution as that is the
-default family option in \pkg{depmixS4}. A multivariate model can be
-specified by providing a list of formulae rather than a single one as
-above:
-
-\begin{verbatim}
-mod <- depmix(list(rt~1,corr~1), data=speed, nstates=2,
-family=list(gaussian(),multinomial())
-\end{verbatim}
-
-Here it is also necessary to provide the family functions for each of
-the responses. Currently, the gaussian() and multinomial() are
-implemented.
-
-The function \code{depmix} returns an object of class \code{depmix}
-which has its own summary function providing the parameter values of
-the model. The object consists of three main parts: the prior model,
-which specifies the initial state probabilities, the transition
-models, specifying the transition probabilities for each state, and
-the response models, specifying the densities for each response and
-each state. See the help files for further details.
-
-Except in simple cases, starting values can be a problem in latent
-Markov models, and so in general it's best to provide them if you have
-a fairly good idea of what to expect. Providing starting values is
-done through three arguments: respstart, trstart, and instart, for
-response related parameters, transition parameters and prior
-parameters, respectively. The use of setpars reveals the ordering of
-parameters that should be used:
-
-\begin{verbatim}
-mod <- depmix(list(rt~1,corr~1), data=speed, nstates=2,
-family=list(gaussian(),multinomial())
-setpars(mod,1:npar(mod))
-\end{verbatim}
-
-See the paragraph on parameter numbering below for further details.
-
-
-\subsection{Transition matrix and initial state probabilities}
-
-The transition matrix is parametrized as a list of multinomial
-logistic models. The initial state probabilities are similarly
-parametrized as a multinomial logistic model. Both models use a base
-category parametrization, meaning that the parameter for the base
-category is fixed at zero. The default base category is the first
-state. Hence, for example, for a 3-state model, the initial state
-probability model would have three parameters of which the first is
-fixed at zero and the other two are freely estimated.
-
-%See
-%\citet{Agresti20??} for multinomial logistic models and various
-%parameterizations.
-
-Covariates can be specified using a one-sided formula as in the
-following example:
-
-\begin{verbatim}
-mod <- depmix(list(rt~1,corr~1), data=speed, nstates=2,
-transition=~Pacc)
-\end{verbatim}
-
-Note that this can be done for the initial state probabilities by
-specifying prior=~X1, where X1 is the desired covariate. The result
-of this is that the transition probabilities are now dependent on the
-covariate Pacc (which is an experimenter controlled variable to induce
-switching between guessing and accurate responding).
-
-
-\subsection{Fitting models}
-
-Fitting models is done using the function \code{fit}. The standard
-call only requires a model object of class \code{depmix}:
-
-\begin{verbatim}
-mod <- depmix(list(rt~1,corr~1), data=speed, nstates=2,
-family=list(gaussian(),multinomial())
-fmod <- fit(mod)
-\end{verbatim}
-
-The function returns an object of class \code{depmix.fitted} which
-extends the \code{depmix} class, adding convergence information and
-possibly information about constraints if these were applied. The
-function provides some online output on the progress of the
-optimization, the precise form of the output depends on the
-optimization method chosen.
-
-Class \code{depmix} and \code{depmix.fitted} have \code{logLik},
-\code{AIC} and \code{BIC} methods to provide fit statistics.
-
-
-\subsection{Fixing and constraining parameters}
-
-Constraining and fixing parameters is done using the \code{conpat}
-argument to the \code{depmix.fit}-function, which specifies for each
-parameter in the model whether it's fixed (0) or free (1 or higher).
-Equality constraints can be imposed by having two parameters have the
-same number in the \code{conpat} vector. When only fixed values are
-required the \code{fixed} argument can be used instead of
-\code{conpat}, with zeroes for fixed parameters and other values (ones
-e.g.) for non-fixed parameters. Fitting the models subject to these
-constraints is handled by the optimization routine \code{donlp2}.
-
-\paragraph{Parameter numbering} When using the \code{conpat} and
-\code{fixed} arguments, complete parameter vectors should be supplied,
-i.e., these vectors should have length of the number of parameters of
-the model, which can be obtained by calling \code{npar(object)}.
-Parameters are numbered in the following order:
-\begin{enumerate}
- \item the prior model parameters
-
- \item the parameters for the transition models
-
- \item the response model parameters per state (and subsequently
- per response in the case of multivariate time series)
-
-\end{enumerate}
-
-To see the ordering of parameters use the following:
-\begin{verbatim}
-mod <- setpars(mod, value=1:npar(mod))mod
-\end{verbatim}
-
-To see which parameters are fixed (by default only baseline parameters
-in the multinomial logistic models for the transition models and the
-initial state probabilities model:
-\begin{verbatim}
-mod <- setpars(mod,
-getpars(mod,which="fixed"))mod
-\end{verbatim}
-
-\bibliography{all,ingmar}
-
-\end{document}
-
Deleted: papers/vignette/depmix-intro.toc
===================================================================
--- papers/vignette/depmix-intro.toc 2009-07-08 14:57:02 UTC (rev 285)
+++ papers/vignette/depmix-intro.toc 2009-07-08 14:58:56 UTC (rev 286)
@@ -1,12 +0,0 @@
-\contentsline {section}{\numberline {1}Introduction}{3}
-\contentsline {section}{\numberline {2}Dependent mixture models}{4}
-\contentsline {subsection}{\numberline {2.1}Likelihood}{5}
-\contentsline {subsection}{\numberline {2.2}Computational considerations}{5}
-\contentsline {subsection}{\numberline {2.3}Parameter estimation}{5}
-\contentsline {section}{\numberline {3}Using depmixS4}{6}
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/depmix -r 286
More information about the depmix-commits
mailing list