Have been updating the ctsem package to better conform to stan guidelines, works fine for me on windows and ubuntu, getting an error that means very little to me from a debian build in the cran pre-check – can anyone help?
Error:
/home/hornik/tmp/R/etc/Makeconf:164: recipe for target ‘stan_files/ctsm.o’ failed
Full log file:
https://win-builder.r-project.org/incoming_pretest/ctsem_2.6.2_20180606_162211/Debian/00install.out
package:
You need to make sure the sqrt
operations in doubles, such as
o1 = whichbinary_y[rowi,1:nbinary_y[rowi]];
o0 = whichcont_y[rowi,1:ncont_y[rowi]];
if(rowi!=1 && intoverstates==1) cobscount += nobs_y[rowi-1]; // number of non missing observations, treated as gaussian, until now
if(rowi!=1 && intoverstates==0) cobscount += ncont_y[rowi-1]; // number of non missing observations, treated as gaussian, until now
if(ukf==1){ //ukf approximation parameters
if(T0check[rowi] == 1) { ndynerror = nlatent; } else ndynerror = ndiffusion;
if(T0check[rowi]==1 || ( ndiffusion < nlatent && T0check[rowi-1]==1)) {
asquared = 2.0/sqrt(nlatentpop+ndynerror) * 1e-1;
l = asquared * (nlatentpop + ndynerror + k) - (nlatentpop+ndynerror);
sqrtukfadjust = sqrt(nlatentpop + ndynerror +l);
}
}
if(T0check[rowi] == 1) { // calculate initial matrices if this is first row for si
{
vector[nparams] rawindparams;
vector[nparams] tipredaddition;
which you can make
sqrt(nlatentpop + ndynerror + 0.0)
1 Like
Wonderful, thanks… hopefully that does the trick!
Edit: works good.