[Depmix-commits] r577 - in pkg/depmixS4: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 29 15:11:02 CET 2013
Author: ingmarvisser
Date: 2013-01-29 15:11:02 +0100 (Tue, 29 Jan 2013)
New Revision: 577
Modified:
pkg/depmixS4/NEWS
pkg/depmixS4/R/depmix-class.R
pkg/depmixS4/R/llratio.R
pkg/depmixS4/R/stationary.R
pkg/depmixS4/R/transInit.R
Log:
Minor changes related to R version 3.0.0 (these were released in version 1.2-2 of depmixS4).
Modified: pkg/depmixS4/NEWS
===================================================================
--- pkg/depmixS4/NEWS 2013-01-29 14:04:40 UTC (rev 576)
+++ pkg/depmixS4/NEWS 2013-01-29 14:11:02 UTC (rev 577)
@@ -33,6 +33,18 @@
probabilities and transition models (with identity link) are now set to
zero to speed-up convergence. Current threshold is 1e-6.
+Changes in depmixS4 version 1.2-2
+
+ o Changed class assignment of depmix.fitted object using as().
+
+ o Fixed a bug in the fit method of depmix models: linear inequality
+ constraints were not passed on to rsolnp (thanks to Peiming Wang for
+ bringing this to my attention).
+
+Changes in depmixS4 version 1.2-1
+
+ o Fixed a bug in handling of missing values for mix models
+
Changes in depmixS4 version 1.2-0
Major changes
Modified: pkg/depmixS4/R/depmix-class.R
===================================================================
--- pkg/depmixS4/R/depmix-class.R 2013-01-29 14:04:40 UTC (rev 576)
+++ pkg/depmixS4/R/depmix-class.R 2013-01-29 14:11:02 UTC (rev 577)
@@ -82,7 +82,7 @@
# random generation is slow when done separately for each t, so first draw
# variates for all t, and then determine state sequences iteratively
states <- array(,dim=c(nt,nsim))
- states[bt,] <- simulate(object at prior,n=nsim,is.prior=T)
+ states[bt,] <- simulate(object at prior,nsim=nsim,is.prior=TRUE)
sims <- array(,dim=c(nt,ns,nsim))
states <- as.vector(states)
@@ -281,7 +281,7 @@
# random generation is slow when done separately for each t, so first draw
# variates for all t, and then determine state sequences iteratively
states <- array(,dim=c(nt,nsim))
- states[bt,] <- simulate(object at prior,n=nsim,is.prior=T)
+ states[bt,] <- simulate(object at prior,nsim=nsim,is.prior=TRUE)
sims <- array(,dim=c(nt,ns,nsim))
for(i in 1:ns) {
if(is.stationary(object)) {
Modified: pkg/depmixS4/R/llratio.R
===================================================================
--- pkg/depmixS4/R/llratio.R 2013-01-29 14:04:40 UTC (rev 576)
+++ pkg/depmixS4/R/llratio.R 2013-01-29 14:11:02 UTC (rev 577)
@@ -19,7 +19,7 @@
setMethod("show","llratio",
function(object) {
- pvalue=round(pchisq(object at value,object at df,lower=FALSE),3)
+ pvalue=round(pchisq(object at value,object at df,lower.tail=FALSE),3)
cat("log Likelihood ratio (chi^2): ", round(object at value,3), " (df=",object at df,"), p=",pvalue,".\n",sep="")
}
)
Modified: pkg/depmixS4/R/stationary.R
===================================================================
--- pkg/depmixS4/R/stationary.R 2013-01-29 14:04:40 UTC (rev 576)
+++ pkg/depmixS4/R/stationary.R 2013-01-29 14:11:02 UTC (rev 577)
@@ -9,7 +9,7 @@
nr <- nrow(tpm)
rs <- all.equal(rowSums(tpm),rep(1,nr))
if(!(rs==TRUE)) stop("rows of the transition matrix should sum to unity")
- e1 <- as.real(eigen(t(tpm))$vectors[,1])
+ e1 <- as.double(eigen(t(tpm))$vectors[,1])
e1 <- e1/sum(e1)
return(e1)
}
Modified: pkg/depmixS4/R/transInit.R
===================================================================
--- pkg/depmixS4/R/transInit.R 2013-01-29 14:04:40 UTC (rev 576)
+++ pkg/depmixS4/R/transInit.R 2013-01-29 14:11:02 UTC (rev 577)
@@ -38,7 +38,7 @@
fixed <- c(as.logical(fixed))
}
constr <- list(
- lin = matrix(1,nr=1,nc=nstates),
+ lin = matrix(1,nrow=1,ncol=nstates),
linup = 1,
linlow = 1,
parup = rep(1,nstates),
More information about the depmix-commits
mailing list