thank you for your answer, it looks like I found a workaround in the last couple of days.
To use the predict function, the priors value (ssc@metadata[["priors"]]) in the SpatialShrunkenCentroids2 object must be set. This is only the case when the "y" or "priors" argument is passed to the SpatialShrunkenCentroids function call.
In my case I don't have these values prior to the function call, so after the SpatialShrunkenCentroids function is executed, I manually calculate and set the priors for the SpatialShrunkenCentroids2 object, based on the resultData.
So if anyone else has my problem, with the following code everything seems to work fine:
> ssc <- spatialShrunkenCentroids( boundingbox_ms, method="gaussian", r=1, s=10, k=3 )
> resultData <- ssc@resultData@listData[[1]][["class"]]
> my_priors <- table( resultData ) / length(
resultData )
> ssc@metadata[["priors"]] <- my_priors
> pred <- predict( object = ssc, newx = boundingbox_ms )
Cheers,
Pascal