[Depmix-commits] r218 - trunk/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 1 16:24:08 CEST 2008


Author: ingmarvisser
Date: 2008-08-01 16:24:08 +0200 (Fri, 01 Aug 2008)
New Revision: 218

Modified:
   trunk/R/transInit.R
Log:
Changed predict method to deal with multinomial(identity) objects.

Modified: trunk/R/transInit.R
===================================================================
--- trunk/R/transInit.R	2008-08-01 14:23:17 UTC (rev 217)
+++ trunk/R/transInit.R	2008-08-01 14:24:08 UTC (rev 218)
@@ -74,7 +74,8 @@
 
 setMethod("predict","transInit",
 	function(object) {
-		object at family$linkinv(object at x%*%object at parameters$coefficients,base=object at family$base)
+		if(object at family$link=="identity") object at family$linkinv(object at x%*%object at parameters$coefficients)
+		else object at family$linkinv(object at x%*%object at parameters$coefficients,base=object at family$base)
 	}
 )
 


More information about the depmix-commits mailing list