I am having some problems with svydesign() in R. My sample design is a 2 stage stratification.


How should my fpc2 term be constructed? I having tried including the population size within each strata. i.e.


    new2=x %>% group_by(a,b) %>% summarise(Freq=n())

    x=merge(x, new2, by=c("a","b"))


    Error in popsize < sampsize : non-conformable arrays

closed as off-topic by whuber Jun 15 '18 at 15:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – whuber
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Welcome to CV. If you use code in libraries please load these libraries in your example code. This time I did it for you. $\endgroup$ – Ferdi Jun 15 '18 at 14:17