[Depmix-commits] r508 - in pkg/depmixS4: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 15 14:41:41 CET 2012


Author: ingmarvisser
Date: 2012-03-15 14:41:41 +0100 (Thu, 15 Mar 2012)
New Revision: 508

Modified:
   pkg/depmixS4/DESCRIPTION
   pkg/depmixS4/NAMESPACE
   pkg/depmixS4/R/EM.R
   pkg/depmixS4/R/fb.R
   pkg/depmixS4/R/makePriorModel.R
Log:
Changes to make the package compatible with 2.15.0

Modified: pkg/depmixS4/DESCRIPTION
===================================================================
--- pkg/depmixS4/DESCRIPTION	2012-03-05 14:08:41 UTC (rev 507)
+++ pkg/depmixS4/DESCRIPTION	2012-03-15 13:41:41 UTC (rev 508)
@@ -5,7 +5,7 @@
 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.14.2), stats, nnet, methods, MASS, Rsolnp, stats4
-Suggests: Rdonlp2, gamlss, gamlss.dist, TTR
+Suggests: gamlss, gamlss.dist, TTR
 Description: Fit latent (hidden) Markov models on mixed categorical and continuous (timeseries)
    data, otherwise known as dependent mixture models
 License: GPL (>=2)

Modified: pkg/depmixS4/NAMESPACE
===================================================================
--- pkg/depmixS4/NAMESPACE	2012-03-05 14:08:41 UTC (rev 507)
+++ pkg/depmixS4/NAMESPACE	2012-03-15 13:41:41 UTC (rev 508)
@@ -2,7 +2,7 @@
 
 importFrom(stats, predict, simulate)
 
-importFrom(stats4, AIC, BIC, logLik, nobs)
+importFrom(stats4, AIC, BIC, logLik, nobs, summary)
 
 export(	
 	makeDepmix,

Modified: pkg/depmixS4/R/EM.R
===================================================================
--- pkg/depmixS4/R/EM.R	2012-03-05 14:08:41 UTC (rev 507)
+++ pkg/depmixS4/R/EM.R	2012-03-15 13:41:41 UTC (rev 508)
@@ -31,7 +31,7 @@
 	if(random.start) {
 				
 		nr <- sum(ntimes(object))
-		gamma <- matrix(runif(nr*ns,min=.0001,max=.9999),nr=nr,nc=ns)
+		gamma <- matrix(runif(nr*ns,min=.0001,max=.9999),nrow=nr,ncol=ns)
 		gamma <- gamma/rowSums(gamma)
 		LL <- -1e10
 		
@@ -143,7 +143,7 @@
 	if(random.start) {
 				
 		nr <- sum(ntimes(object))
-		gamma <- matrix(runif(nr*ns,min=.0001,max=.9999),nr=nr,nc=ns)
+		gamma <- matrix(runif(nr*ns,min=.0001,max=.9999),nrow=nr,ncol=ns)
 		gamma <- gamma/rowSums(gamma)
 		LL <- -1e10
 		

Modified: pkg/depmixS4/R/fb.R
===================================================================
--- pkg/depmixS4/R/fb.R	2012-03-05 14:08:41 UTC (rev 507)
+++ pkg/depmixS4/R/fb.R	2012-03-15 13:41:41 UTC (rev 508)
@@ -55,8 +55,8 @@
 			xi=as.double(xi),
  			PACKAGE="depmixS4")[c("alpha","beta","sca","xi")]
 		
-		alpha <- matrix(res$alpha,nc=ns,byrow=TRUE)
-		beta <- matrix(res$beta,nc=ns,byrow=TRUE)
+		alpha <- matrix(res$alpha,ncol=ns,byrow=TRUE)
+		beta <- matrix(res$beta,ncol=ns,byrow=TRUE)
 		xi <- array(res$xi,dim=c(nt,ns,ns))
 		xi[et,,] <- NA
 		sca <- res$sca

Modified: pkg/depmixS4/R/makePriorModel.R
===================================================================
--- pkg/depmixS4/R/makePriorModel.R	2012-03-05 14:08:41 UTC (rev 507)
+++ pkg/depmixS4/R/makePriorModel.R	2012-03-15 13:41:41 UTC (rev 508)
@@ -7,12 +7,12 @@
 	
 	# initial probabilities model, depending on covariates init(=~1 by default)
 	if(formula==~1) {
-		initModel <- transInit(~1,data=data.frame(rep(1,ncases)),nst=nstates,family=multinomial(link="identity"),pstart=values)
+		initModel <- transInit(~1,data=data.frame(rep(1,ncases)),nstates=nstates,family=multinomial(link="identity"),pstart=values)
 	} else {
 		if(is.null(data)) {
 			stop("Argument 'initdata' missing with non-trivial prior model")
 		} else {
-			initModel <- transInit(formula,data=data,nst=nstates,family=multinomial(),pstart=values)
+			initModel <- transInit(formula,data=data,nstates=nstates,family=multinomial(),pstart=values)
 		}	
 	}
 	



More information about the depmix-commits mailing list