[Depmix-commits] r559 - pkg/depmixS4/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 8 13:03:44 CEST 2012
Author: ingmarvisser
Date: 2012-08-08 13:03:44 +0200 (Wed, 08 Aug 2012)
New Revision: 559
Modified:
pkg/depmixS4/man/depmix.fit.Rd
Log:
Added an example with missing data to ?fit
Modified: pkg/depmixS4/man/depmix.fit.Rd
===================================================================
--- pkg/depmixS4/man/depmix.fit.Rd 2012-08-08 10:48:56 UTC (rev 558)
+++ pkg/depmixS4/man/depmix.fit.Rd 2012-08-08 11:03:44 UTC (rev 559)
@@ -190,6 +190,21 @@
# to see the parameters
summary(fmod1)
+# same model, now with missing data
+
+speed[2,1] <- NA
+speed[3,2] <- NA
+
+# 2-state model on rt and corr from speed data set
+# with Pacc as covariate on the transition matrix
+# ntimes is used to specify the lengths of 3 separate series
+mod1ms <- depmix(list(rt~1,corr~1),data=speed,transition=~Pacc,nstates=2,
+ family=list(gaussian(),multinomial("identity")),ntimes=c(168,134,137))
+# fit the model
+set.seed(3)
+fmod1ms <- fit(mod1ms)
+
+
# FIX SOME PARAMETERS
# get the starting values of this model to the optimized
More information about the depmix-commits
mailing list