Skip to content

Commit e623863

Browse files
authored
Fixed a bug with non-default priors for cross-validation
1 parent 932c09c commit e623863

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/computePredictedValues.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ computePredictedValues = function(hM, partition=NULL, partition.sp=NULL, start=1
124124
hM1 = Hmsc(Y=hM$Y[train,,drop=FALSE], Loff=hM$Loff[train,,drop=FALSE], X=XTrain,
125125
XRRR=XRRRTrain, ncRRR = hM$ncRRR, XSelect = hM$XSelect,
126126
distr=hM$distr, studyDesign=dfPi, Tr=hM$Tr, C=hM$C, ranLevels=hM$rL)
127-
setPriors(hM1, V0=hM$V0, f0=hM$f0, mGamma=hM$mGamma, UGamma=hM$UGamma, aSigma=hM$aSigma, bSigma=hM$bSigma, rhopw=hM$rhowp)
127+
hM1 = setPriors(hM1, V0=hM$V0, f0=hM$f0, mGamma=hM$mGamma, UGamma=hM$UGamma, aSigma=hM$aSigma, bSigma=hM$bSigma, rhopw=hM$rhowp)
128128
hM1$YScalePar = hM$YScalePar
129129
hM1$YScaled = (hM1$Y - matrix(hM1$YScalePar[1,],hM1$ny,hM1$ns,byrow=TRUE)) / matrix(hM1$YScalePar[2,],hM1$ny,hM1$ns,byrow=TRUE)
130130
hM1$XInterceptInd = hM$XInterceptInd

0 commit comments

Comments
 (0)