sdcTools / sdcMicro

sdcMicro
http://sdctools.github.io/sdcMicro/
79 stars 23 forks source link

rankSwapp, possible change on defaults #289

Closed matthias-da closed 4 years ago

matthias-da commented 4 years ago

From Vincenc:

I found in the last version 5.5.0 that there is something that
seems to be an error or not explained with enough detail in rankSwap.
It is the following line

casc.rs0.01 <- rankSwap(casc, variables=cascV, P=0.01)

sdcMicro states that "only one of the parameters P, R0 and K0
should be provided" while only P is provided. And this seems to be
because R0 has a default value. So, I need to explicitly define it as
NULL.

data(CASCrefmicrodata)
casc <- CASCrefmicrodata
cascV <- colnames(casc)
casc.rs0.01 <- rankSwap(casc, variables=cascV, P=0.01, R0=NULL)

best regards,

vicenc