[Depmix-commits] r628 - pkg/depmixS4/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 2 13:32:10 CEST 2014


Author: maarten
Date: 2014-04-02 13:32:06 +0200 (Wed, 02 Apr 2014)
New Revision: 628

Modified:
   pkg/depmixS4/R/responseGLM.R
Log:
- added names to getpars for mlogit model

Modified: pkg/depmixS4/R/responseGLM.R
===================================================================
--- pkg/depmixS4/R/responseGLM.R	2014-04-02 10:58:55 UTC (rev 627)
+++ pkg/depmixS4/R/responseGLM.R	2014-04-02 11:32:06 UTC (rev 628)
@@ -212,8 +212,10 @@
 						"pars" = {
 								parameters <- numeric()
 								if(object at family$family=="multinomial"&object at family$link=="mlogit") {
-										# coefficient is usually a matrix here 
-										parameters <- c(t(object at parameters$coefficients)) # Why transpose?
+										# coefficient is usually a matrix here
+                    tmp <- object at parameters$coefficients
+										parameters <- c(t(tmp)) # Why transpose?
+										names(parameters) <- paste(rep(rownames(tmp),each=length(colnames(tmp))),colnames(tmp),sep=".")
 								} else {
 										parameters <- object at parameters$coefficients
 										if(object at family$family=="gaussian") {



More information about the depmix-commits mailing list