Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Trends in No. of rooms & No. of occupants

From   "Newson, Roger B" <>
To   <>
Subject   st: RE: Trends in No. of rooms & No. of occupants
Date   Wed, 7 Feb 2007 17:19:54 -0000

This looks like a job for the somersd package, downloadable from SSC.
You can install somersd by typing, in Web-aware Stata,

ssc install somersd, replace

It might then be a good idea to exit Stata and to start Stata up again.
Then, load your data, and type

somersd q5rooms q22ops, tr(z) tdist

and this will produce a 95% confidence interval for Somers' D of q22ops
with respect to q5rooms. Somers' D is a rank-based measure of ordinal
trend. If you sample, at random, a pair of respondents with different
values for q5rooms, then Somers' D is the difference between 2
probabilities, namely the probability that the respondent with more
rooms has more occupants and the probability that the respondent with
more rooms has fewer occupants.

More information about Somers' D, and the somersd package, can be
downloaded from my website (see my signature below).

I hope this helps.


Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
[] On Behalf Of Todd
Sent: 07 February 2007 17:01
Subject: st: Trends in No. of rooms & No. of occupants

Good evening. Im looking for a bit of advice on analysis of a database
from a household survey in Haiti.

I have one variable 'q5rooms'that tells how many rooms are in the house.

I have a second variable 'q22occups' that tells how many persons livein
the house.

As you might imagine, I am using these to build a picure of household
economic status.

I am trying to see if there is a proportional trend in the number of
rooms and the number of occupants. That is to say, do the people
reporting a larger number of rooms also report a larger number of

Thanks for any advice


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index