Dear Gaston,
I run into a bug when specifying the scaling argument in plpsm() for models that contain formative blocks (mode B) with 2 manifest variables (MVs).
The reason for this is comes from get_weights_nonmetric(), which is called whenever scaling is specified (even if all MVs are specified to be numerical).
In this function, the computation of X* when mode B is used is given by:
The problem is that when block_sizes[q] == 2, then QQ[[q]][,-p] won't be a matrix object, but a numeric vector, which causes the %*% operation to fail.
The fix is very simple: QQ[[q]][ -p, drop = FALSE ] should be used in the definition of X.star[,p]
Dear Gaston, I run into a bug when specifying the
scaling
argument inplpsm()
for models that contain formative blocks (mode B) with 2 manifest variables (MVs).The reason for this is comes from
get_weights_nonmetric()
, which is called wheneverscaling
is specified (even if all MVs are specified to be numerical).In this function, the computation of X* when mode B is used is given by:
Where
q
refers to the LV,p
to the MV.The problem is that when
block_sizes[q] == 2
, thenQQ[[q]][,-p]
won't be a matrix object, but a numeric vector, which causes the%*%
operation to fail.The fix is very simple:
QQ[[q]][ -p, drop = FALSE ]
should be used in the definition ofX.star[,p]
Best regards, G