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$
2
  • 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$ Commented May 11, 2016 at 16:50
  • $\begingroup$ What made you decide to want to compare third quartiles? The appearance of the plot? $\endgroup$
    – Glen_b
    Commented May 12, 2016 at 0:33

1 Answer 1

6
$\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$
4
  • $\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$ Commented Dec 19, 2018 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$ Commented Dec 19, 2018 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
    Commented Dec 19, 2018 at 21:04
  • $\begingroup$ Analternative could be permutation tests: rcompanion.org/handbook/F_15.html $\endgroup$ Commented Sep 6, 2019 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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