gastonstat / plspm

R package plspm
62 stars 26 forks source link

get_weights function return NULL #15

Closed jszhao closed 6 years ago

jszhao commented 6 years ago

In get_weights function, it would return NULL if iter == specs$maxiter. It means get_weights function does not find weights with in maxiter. However, it will trigger a error in rebus.pls function:

Error in split.X[[k]] %*% out.ws$W : 
  requires numeric/complex matrix/vector arguments
jszhao commented 6 years ago

I find there is a function call test_null_weights, that give enough information. with adding the following line into it.reb.r Line 182, the above error message will be replaced by the one in test_null weights.

ok_weights = test_null_weights(out.ws, specs)