[Depmix-commits] r395 - in trunk: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 8 23:05:16 CET 2010


Author: ingmarvisser
Date: 2010-03-08 23:05:16 +0100 (Mon, 08 Mar 2010)
New Revision: 395

Modified:
   trunk/DESCRIPTION
   trunk/NAMESPACE
   trunk/R/depmixfit.R
   trunk/R/responseMVN.R
   trunk/man/depmix-internal.Rd
   trunk/man/depmix.fit.Rd
Log:
Solved df problems in multinomial identity models

Modified: trunk/DESCRIPTION
===================================================================
--- trunk/DESCRIPTION	2010-03-08 18:47:27 UTC (rev 394)
+++ trunk/DESCRIPTION	2010-03-08 22:05:16 UTC (rev 395)
@@ -1,10 +1,10 @@
 Package: depmixS4
-Version: 0.3-0
-Date: 2010-01-19
+Version: 0.9-0
+Date: 2010-03-08
 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), stats, nnet, methods, MASS
+Depends: R (>= 2.9.1), stats, nnet, methods, MASS, Rsolnp
 Suggests: Rdonlp2, gamlss, gamlss.dist
 Description: Fit latent (hidden) Markov models on mixed categorical and continuous (timeseries)
    data, otherwise known as dependent mixture models

Modified: trunk/NAMESPACE
===================================================================
--- trunk/NAMESPACE	2010-03-08 18:47:27 UTC (rev 394)
+++ trunk/NAMESPACE	2010-03-08 22:05:16 UTC (rev 395)
@@ -45,7 +45,6 @@
 	depmix,
 	mix,
 	posterior,
-	getModel,
 	GLMresponse,
 	MVNresponse,
 	transInit,

Modified: trunk/R/depmixfit.R
===================================================================
--- trunk/R/depmixfit.R	2010-03-08 18:47:27 UTC (rev 394)
+++ trunk/R/depmixfit.R	2010-03-08 22:05:16 UTC (rev 395)
@@ -156,9 +156,7 @@
 				ineq <- which(lin.u!=lin.l)
 				if(length(ineq)>0) lineq <- lincon[-ineq, ,drop=FALSE]
 				else lineq <- lincon
-				
-				print(lincon)
-				
+								
 				# returns the evaluated equality constraints
 				if(nrow(lineq)>0) {
 					eqfun <- function(pp) {
@@ -172,9 +170,7 @@
 					eqfun=NULL
 					lineq.bound=NULL
 				}
-				
-				print(lineq.bound)
-				
+								
 				# select the inequality constraints
 				if(length(ineq)>0) {
 					linineq <- lincon[ineq, ,drop=FALSE]

Modified: trunk/R/responseMVN.R
===================================================================
--- trunk/R/responseMVN.R	2010-03-08 18:47:27 UTC (rev 394)
+++ trunk/R/responseMVN.R	2010-03-08 22:05:16 UTC (rev 395)
@@ -142,7 +142,8 @@
 		constr <- NULL
 		parameters$coefficients <- matrix(0.0,ncol=ncol(y),nrow=ncol(x))
 		parameters$Sigma <- cov2par(diag(ncol(y)))
-		npar <- length(unlist(parameters))		
+		npar <- length(unlist(parameters))
+# 		constr <- list(parlow=c(rep(-Inf,length(unlist(parameters$coefficients))),
 		if(is.null(fixed)) fixed <- as.logical(rep(0,npar))
 		if(!is.null(pstart)) {
 			if(length(pstart)!=npar) stop("length of 'pstart' must be",npar)

Modified: trunk/man/depmix-internal.Rd
===================================================================
--- trunk/man/depmix-internal.Rd	2010-03-08 18:47:27 UTC (rev 394)
+++ trunk/man/depmix-internal.Rd	2010-03-08 22:05:16 UTC (rev 395)
@@ -21,6 +21,9 @@
 \alias{cov2par}
 \alias{par2cov}
 
+\alias{getConstraints}
+\alias{getConstraints,mix-method}
+
 \alias{nlin}
 \alias{nlin,depmix.fitted-method}
 \alias{nlin,mix.fitted-method}

Modified: trunk/man/depmix.fit.Rd
===================================================================
--- trunk/man/depmix.fit.Rd	2010-03-08 18:47:27 UTC (rev 394)
+++ trunk/man/depmix.fit.Rd	2010-03-08 22:05:16 UTC (rev 395)
@@ -172,9 +172,6 @@
 # to see the parameters
 summary(fmod1)
 
-\dontrun{
-# NOTE: this requires Rdonlp2 package to be installed
-
 # FIX SOME PARAMETERS
 
 # get the starting values of this model to the optimized 
@@ -206,6 +203,8 @@
 # values of the previously fitted model to speed optimization
 
 pars <- c(unlist(getpars(fmod2)))
+pars[4] <- pars[8] <- -4
+pars[6] <- pars[10] <- 10
 mod3 <- setpars(mod2,pars)
 
 # start with fixed and free parameters
@@ -229,10 +228,8 @@
 
 # note here that we use the fitted model fmod2 as that has appropriate 
 # starting values
-fmod3b <- fit(fmod2,conrows=conr,fixed=!free) # using free defined above
+fmod3b <- fit(mod3,conrows=conr,fixed=!free) # using free defined above
 
-}
-
 data(balance)
 # four binary items on the balance scale task
 



More information about the depmix-commits mailing list