-qv- and –qvgraph- nifty new commands for estimating quasi-variances in Stata

Roxanne Connelly, University of Edinburgh

In sociological analyses we are often dealing with multiple category explanatory variables (e.g. educational qualifications, social class, ethnic group). In standard models the effects of these variables are assessed by selecting one category as the reference category, to which all other categories are compared. Making comparisons to the reference category is useful when we are substantively interested in one particular social group (e.g. the educational performance of White children in comparison with other ethnic groups). However we are often interested in making comparisons with groups that do not contain the reference category.

Firth proposes the use of quasi-variance statistics to overcome the reference category problem (see Firth 2000, Firth 2003, Firth and Menezes 2004). Presenting quasi-variances allows for the comparison of all categories in a multiple category variable, therefore comparisons between groups which do not include the reference category are possible. See Gayle and Lambert (2007) for an accessible discussion of quasi-variance for sociologists.

Until recently I have been using Firth’s (2000) online calculator to compute quasi-variances. This is an excellent facility. However, it does cause a break in the workflow and allows for the introduction of human error as one must copy the values of a variance covariance matrix into the online calculator. It is for this reason that I was very excited when I saw that Aspen Chen (2014) had developed the programs -qv- and –qvgraph- for Stata. These programs have saved me a great deal of time and the facility to graph coefficients alongside quasi-standard errors is straightforward and very useful.

Below I demonstrate the use of these commands. I use some data from the 1970 British Cohort Study Teaching Dataset (SN5805). I examine standardised scores on the Edinburgh reading test, taken at age 10. The explanatory variables are mother’s age at the child’s birth, mother’s interest in the child’s education (1 Very, 0 Not Very) and the mother’s educational qualifications (5 levels). In this example I am interested in understanding the association between mothers’ educational qualifications and their child’s test performance.

First, I estimate a linear regression. Looking at mother’s education (mumeduc), the reference category has been set at level 1 (no educational qualifications). All other qualification levels are compared against this baseline. We can see that children with mothers of all qualification levels perform better on the test than mothers with no educational qualifications.

**If you click on the images you can view a larger version**

one

Next I use the qv command alongside the variable of interest. For those less familiar with Stata, you must first install user written commands on your machine. For more details see here.

two

Just to be sure I first checked the Quasi-SE values produced using the –qv- command with those produced using Firth’s calculator. This involved retrieving the variance-covariance matrix and plugging it into the online calculator.

three

four

Looking at the output the results are identical, which is very reassuring.

five

Next I utilise the -qvgraph- to plot the point estimates alongside quasi-standard errors.

six

seven

You can adjust -qvgraph- using standard graphing commands to make it a little prettier.

eight

nine

From the quasi-standard errors we can see that there is a significant difference between the performance of children whose mothers have no qualifications, and all other educational groups. We saw this using conventional standard errors. Using quasi-variance we can see, for example, that there is no significant difference between the children of mothers with O Levels and A Levels.

All in all these commands are straightforward, effective and great time savers, thanks Aspen Chen!

References

Chen, A. (2014). “QV: Stata module to compute quasi-variances.” Statistical Software Components.

Firth, D. (2000). “Quasi-variances in Xlisp-Stat and on the Web.” Journal of Statistical Software 5.4: 1-13.

Firth, D. (2003). “Overcoming the Reference Category Problem in the Presentation of Statistical Models.” Sociological Methodology 33(1): 1-18.

Firth, D. and R. Menezes (2004). “Quasi-variances.” Biometrika 91(1): 65-80.

Gayle, V. and P. Lambert (2007). “Using Quasi-Variance To Communicate Sociological Results From Statistical Models.” Sociology 41(6): 1191-1208.

University of London. Institute of Education. Centre for Longitudinal Studies, British Cohort Studies Teaching Dataset for Higher Education, 1958-2000 [computer file]. 2nd Edition. Colchester, Essex: UK Data Archive [distributor], August 2008. SN: 5805, http://dx.doi.org/10.5255/UKDA-SN-5805-1.

5 thoughts on “-qv- and –qvgraph- nifty new commands for estimating quasi-variances in Stata

  1. Aspen Chen

    I just came across this post. Thank you for using and introducing this Stata routine! I hope it is serving your research well. Please let me know if you have any suggestions to make it work better.

    Liked by 1 person

    Reply
  2. Pingback: A categorical can of worms II: Examining interactions in logit models in Stata | The Detective's Handbook

  3. Pingback: A categorical can of worms II: Examining interactions in logit models in Stata - Research Training Centre

Leave a comment