[Depmix-commits] r318 - trunk/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 19 16:01:16 CET 2010
Author: ingmarvisser
Date: 2010-01-19 16:01:16 +0100 (Tue, 19 Jan 2010)
New Revision: 318
Modified:
trunk/R/responseGLM.R
Log:
Changed setpars to deal with the new multinomial response function.
Modified: trunk/R/responseGLM.R
===================================================================
--- trunk/R/responseGLM.R 2010-01-19 14:30:42 UTC (rev 317)
+++ trunk/R/responseGLM.R 2010-01-19 15:01:16 UTC (rev 318)
@@ -153,10 +153,9 @@
"pars"= {
if(object at family$family=="multinomial") {
object at parameters$coefficients <- matrix(values,ncol(object at x),byrow=TRUE)
- if(prob) object at parameters$coefficients[1,] <- object at family$linkfun(values[1:ncol(object at parameters$coefficients)],base=object at family$base)
-# object at parameters$coefficients[1,] <- values[1:ncol(object at parameters$coefficients)]
-# values <- matrix(values,,ncol(object at x),byrow=TRUE)
-# if(ncol(object at x)>1) object at parameters$coefficients[2:ncol(object at x),] <- values[2:ncol(object at x),]
+ if(object at family$link=="mlogit") {
+ if(prob) object at parameters$coefficients[1,] <- object at family$linkfun(values[1:ncol(object at parameters$coefficients)],base=object at family$base)
+ }
} else {
object at parameters$coefficients <- values[1:length(object at parameters$coefficients)] # matrix(values,ncol(object at x),byrow=TRUE) # this needs fixing!!!!
}
More information about the depmix-commits
mailing list