[Depmix-commits] r329 - trunk
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jan 28 17:06:19 CET 2010
Author: ingmarvisser
Date: 2010-01-28 17:06:19 +0100 (Thu, 28 Jan 2010)
New Revision: 329
Modified:
trunk/DESCRIPTION
trunk/NEWS
trunk/depmixNew-test5.R
Log:
upped version nr to 0.3-0 and related stuff
Modified: trunk/DESCRIPTION
===================================================================
--- trunk/DESCRIPTION 2010-01-28 16:02:54 UTC (rev 328)
+++ trunk/DESCRIPTION 2010-01-28 16:06:19 UTC (rev 329)
@@ -1,10 +1,10 @@
Package: depmixS4
-Version: 0.3
+Version: 0.3-0
Date: 2010-01-19
Title: Dependent Mixture Models
Author: Ingmar Visser <i.visser at uva.nl>, Maarten Speekenbrink <m.speekenbrink at ucl.ac.uk>
Maintainer: Ingmar Visser <i.visser at uva.nl>
-Depends: R (>= 2.9.1), nnet, methods, MASS
+Depends: R (>= 2.9.1), nnet, methods, MASS, MCMCpack
Suggests: Rdonlp2
Description: Fit latent (hidden) Markov models on mixed categorical and continuous (timeseries)
data, otherwise known as dependent mixture models
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-01-28 16:02:54 UTC (rev 328)
+++ trunk/NEWS 2010-01-28 16:06:19 UTC (rev 329)
@@ -7,7 +7,9 @@
can be used for optimization, or alternatively, if and when Rdonlp2
is used, sum constraints need to be added when fitting the model.
- o
+ o added an example of how to specify a model with multivariate normal
+ responses (and fixed a bug in MVNresponse that prevented such models
+ from being specified in the first place).
Changes in depmixS4 version 0.2-2
Modified: trunk/depmixNew-test5.R
===================================================================
--- trunk/depmixNew-test5.R 2010-01-28 16:02:54 UTC (rev 328)
+++ trunk/depmixNew-test5.R 2010-01-28 16:06:19 UTC (rev 329)
@@ -93,16 +93,16 @@
library(depmixS4)
-
# use function xpnd and vech from MCMCpack to convert from lower.tri to square matrix and back
-
# multivariate normal response model
mn <- c(1,2,3)
sig <- matrix(c(1,.5,0,.5,1,0,0,0,2),3,3)
y <- mvrnorm(1000,mn,sig)
mod <- MVNresponse(y~rnorm(1000))
+y <- simulate(mod)
+
head(dens(mod,log=T))
head(predict(mod))
@@ -128,6 +128,18 @@
y <- rbind(y1,y2)
+m1 <- MVNresponse(y~1,pst=c(0,.1,1,0.1,1))
+
+m2 <- MVNresponse(y~1)
+
+m1
+
+m1 at parameters
+
+m2
+
+m2 at parameters
+
rModels <- list(
list(
MVNresponse(y~1)
@@ -152,9 +164,17 @@
fm <- fit(mod)
+fmd <- fit(mod,meth="donlp")
-fm <- fit(mod,meth="donlp")
+pem <- getpars(fm)[7:16]
+pdon <- getpars(fmd)[7:16]
+all.equal(pem,pdon)
+
+fm <- simulate(fm)
+
+fm <- fit(fm)
+
fm
summary(fm)
More information about the depmix-commits
mailing list