certifiedwaif / phd

5 stars 0 forks source link

zero_infl_var.multivariate sometimes fails #7

Closed certifiedwaif closed 9 years ago

certifiedwaif commented 10 years ago

The problem only seems to occur when there's one element in the zero set? I suspect it's something to do with R's types. R is complaining of non-conformable arrays.

test_multivariate_zip_no_zeros() mX 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -0.5995711 0.3704372 0.8337515 -0.4312011 -0.7906997 0.4021149 0.05591997 0.6158704 0.9130003 -0.779094 -0.4534301 -0.0189736 -0.363192 0.1183457 -0.4748137 -0.5962496 -0.2249485 0.7757395 0.1098451 0.6843588 0.7804142 0.4414019 -0.5773195 -0.5485654 -0.7200326 -0.04017229 -0.1251763 0.9319283 -0.7161722 0.9099578 -0.1105389 -0.8812751 -0.4497016 -0.9377035 -0.9710353 -0.02566194 0.1903032 0.1957061 -0.204639 -0.2063392 0.6321521 -0.5296025 0.6537405 0.06695186 0.8578854 0.09958945 0.5202851 -0.8629805 0.5872187 0.2656069 N 50p 2 length(zero.set) 1 zero.set 34 length(mult$vy[zero.set]) 1 length(mult$mC[zero.set,]) 2 dim(mult$mLambda) 2 2 Show Traceback

Rerun with Debug Error in diag(as.matrix(mult$mC[zero.set, ]) %% mult$mLambda %% t(as.matrix(mult$mC[zero.set, : error in evaluating the argument 'x' in selecting a method for function 'diag': Error in as.matrix(mult$mC[zero.set, ]) %*% mult$mLambda : non-conformable arguments

certifiedwaif commented 9 years ago

Fixed long ago.