[Depmix-commits] r323 - trunk/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 21 15:33:15 CET 2010


Author: maarten
Date: 2010-01-21 15:33:15 +0100 (Thu, 21 Jan 2010)
New Revision: 323

Modified:
   trunk/R/responseMVN.R
Log:
fixed bug in fit(MVNresponse): cov.wt now returns a list rather than vector (as previously), changed code to accommodate this

Modified: trunk/R/responseMVN.R
===================================================================
--- trunk/R/responseMVN.R	2010-01-20 13:42:51 UTC (rev 322)
+++ trunk/R/responseMVN.R	2010-01-21 14:33:15 UTC (rev 323)
@@ -10,7 +10,7 @@
 		pars <- object at parameters
 		if(!is.null(w)) fit <- lm.wfit(x=object at x,y=object at y,w=w) else fit <- lm.fit(x=object at x,y=object at y)
 		object at parameters$coefficients <- fit$coefficients
-		if(!is.null(w)) object at parameters$Sigma <- cov.wt(x=fit$residuals,wt=w)["cov"] else object at parameters$Sigma <- cov(fit$residuals)
+		if(!is.null(w)) object at parameters$Sigma <- cov.wt(x=fit$residuals,wt=w)$cov else object at parameters$Sigma <- cov(fit$residuals)
 		#object <- setpars(object,unlist(pars))
 		object
 	}


More information about the depmix-commits mailing list