1

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

webprogrammer
  • 2,393
  • 3
  • 21
  • 27
olympiaca
  • 11
  • 1

1 Answers1

1

If you haven't found an answer yet, you might want to try the following:

pisa2015.mean.pv(pvlabel = "MATH", by = c("CNT", "ST004D01T"), data = stud2018)

I had the same error coming up and this solved the problem for me.

G_Konyarov
  • 15
  • 5