Statistical sample with survey weights - boxplots, anova, regressions
9 views (last 30 days)
Show older comments
Hello everyone,
I am currently using a sample of about 6500 observations to investigate various multivariate relationships within this data. The sample contains survey weights for each observation, which means that not each datapoint is equal but for reasons of representativeness observation nr 1 might count 850 times and observation nr 2 only 257 times, for each observation .....
I am using matlab to conduct various calculations on this data and also want to handle my statistical analysis in matlab, using boxplots, comparing groups (anova, t-tests) and also doing multi-variate regressions. In other software packages there are pre-defined functions for weighted survey data as I am using, for example R "package survey", or STATA survey methods svy. I dont really want to learn a new software and was hoping that matlab might have a good built-in solution for this? The closest I could find was the weighted non-linear regression function, which goes too far already. The other option for me right now is to use the survey weights to clone my data, making 850 observations out of observation nr1 and so forth. But this is a very messy procedure ...
Any ideas?
0 Comments
Answers (1)
Giorgio De Nunzio
on 27 May 2019
Hi Dominik,
did you find a solution? I am also looking for a boxplot that takes into consideration data weights when calculating the median and so on, but could find none for matlab (while R and others - as you say - do have).
Thanks
Giorgio
1 Comment
Giorgio De Nunzio
on 27 May 2019
Two minutes later I've found a solution. I had searched much time with no success and now, here it is. I'll try it as soon as possible,
Best
Giorgio
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!