[Depmix-commits] r195 - trunk/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 30 11:10:46 CEST 2008


Author: ingmarvisser
Date: 2008-06-30 11:10:45 +0200 (Mon, 30 Jun 2008)
New Revision: 195

Modified:
   trunk/R/responseGLM.R
Log:
Fixed a bug in show method for GLMresponse

Modified: trunk/R/responseGLM.R
===================================================================
--- trunk/R/responseGLM.R	2008-06-28 09:33:57 UTC (rev 194)
+++ trunk/R/responseGLM.R	2008-06-30 09:10:45 UTC (rev 195)
@@ -108,7 +108,11 @@
 		if(object at family$family=="multinomial") {
 			# also print probabilities at covariate values of zero
 			cat("Probalities at zero values of the covariates.\n")
-			cat(object at family$linkinv(object at parameters$coefficients[1,],base=object at family$base),"\n")
+			if(!(is.null(dim(object at parameters$coefficients)))) {
+				cat(object at family$linkinv(object at parameters$coefficients[1,],base=object at family$base),"\n")
+			} else {
+				cat(object at family$linkinv(object at parameters$coefficients,base=object at family$base),"\n")
+			}
 		}
 		if(object at family$family=="binomial") {
 			# also print probabilities at covariate values of zero


More information about the depmix-commits mailing list