3
$\begingroup$

I am using r and have ~400 observations divided into 3 groups.

Group A contains 199 observations, while B contains 173 and C contains 24. I have generated a boxplot of their corresponding measures and would like to compare the 3rd quartile between them to see if they are significantly different. I've included the boxplot here.This is what the boxplot looks like

I'm not sure what test I should use to compare the 3rd quartile. Does anyone know?

$\endgroup$
  • 1
    $\begingroup$ Questions solely about how software works are off-topic here, but you may have a real statistical question buried here. You may want to edit your question to clarify the underlying statistical issue. You may find that when you understand the statistical concepts involved, the software-specific elements are self-evident or at least easy to get from the documentation. $\endgroup$ – gung - Reinstate Monica May 11 '16 at 16:50
  • $\begingroup$ What made you decide to want to compare third quartiles? The appearance of the plot? $\endgroup$ – Glen_b May 12 '16 at 0:33
5
$\begingroup$

You can use quantile regression of the outcome with a factor group variable. It is similar to ordinary regression, which looks how the conditional mean changes with covariates. Instead of the mean, quantile regression considers some conditional quantile that you specify. You can then do a standard test comparing the group coefficients.

In R, the quantreg package can do this.

$\endgroup$
  • $\begingroup$ I had the same idea but this unfortunately it does not work for me. Quantreg always complains about a singular matrix in 'backsolve' (which is not the case). Similar problems have been reported here or in similar form without satisfactory answers here or here. $\endgroup$ – Arne Jonas Warnke Dec 19 '18 at 18:44
  • $\begingroup$ in addition to my previous comment: I guess quantreg with binary or categorical indicators works only if these categories are well balanced across the distribution of the dependent variable. $\endgroup$ – Arne Jonas Warnke Dec 19 '18 at 18:46
  • $\begingroup$ @ArneJonasWarnke I think all MLE estimators require a substantial number of cases for consistency. The rare events problem with the logit is one special case of this. $\endgroup$ – Dimitriy V. Masterov Dec 19 '18 at 21:04
  • $\begingroup$ Analternative could be permutation tests: rcompanion.org/handbook/F_15.html $\endgroup$ – kjetil b halvorsen Sep 6 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.