I am trying to use the intsvy package to calculate a weighted mean by country and gender for Maths capability from plausible values but I keep receiving the same error message.
genderMath <- pisa.mean.pv(pvlabel = "MATH", by = c("CNT", "ST004D01T"), data = stud2018)
Error in weighted.mean.default(data[[k]], data[[paste0(config$variables$weightBRR, : 'x' and 'w' must have the same length