When I use the command for complex sample mean, a warning appears that there are missing values in weights, however I am using the na.rm = TRUE
option. Does anyone know what's going on?
Here's the snippet:
svymean(basedados$variavel , svydesign( id = basedados$estrato , weight =
basedados$peso ),na.rm=TRUE)
> Erro em na.weight(data.frame(weights)) : missing values in 'weights'
I also tested this version and nothing:
svymean(dp$Dcoracao , svydesign( id = dp$V0024 , weight = dp$teste , na.rm = TRUE
),na.rm=TRUE)
> Erro em na.weight(data.frame(weights)) : missing values in 'weights'