Home » Topics » Reproductive Health » Calculating Median Ages
Re: Calculating Median Ages [message #3237 is a reply to message #3203] |
Tue, 11 November 2014 11:33 |
Liz-DHS
Messages: 1516 Registered: February 2013
|
Senior Member |
|
|
Dear User,
Here is a response from Dr. Tom Pullum:
Quote:Say that x is the name of a variable, such as age at marriage, and X is a specific value of that variable, e.g. 19.
If you look at how cumulative percentages are calculated, for any variable, in Stata (or in general), the cumulative percentage for variable x and value X is the percentage of cases with x less than or equal to X. For example, 48.37% is the percentage of cases with x<=19 and 56.12% is the percentage of cases with x<=20. I believe you were not including the "=" sign.
Age "19" is a one-year interval interpreted as age at last birthday. The upper boundary for age 19 is the exact day of the 20th birthday, which has an exact value is 20.00 (you can put as many zeroes after the decimal point as you want). That's why I said that 48.37% of women were married by exact age 20 and 56.12% by exact age 21. In terms of "exact" age, the median must be somewhere between 20.00 and 21.00. I gave the steps for finding the median, 20.2.
By the way, here's a trick that will save you some arithmetic. Paste the following lines into Stata:
input x P
20 48.37
. 50.00
21 56.12
end
regress x P
predict xhat
replace x=xhat if x==.
list x P, table clean
This will give the value of x for which P=50, i.e. the median.
|
|
|
|
|
Calculating Median Ages
By: hlantos on Fri, 06 June 2014 11:37
|
|
|
Re: Calculating Median Ages
By: Liz-DHS on Fri, 06 June 2014 12:01
|
|
|
Re: Calculating Median Ages
By: hlantos on Tue, 24 June 2014 15:07
|
|
|
Re: Calculating Median Ages
By: Liz-DHS on Tue, 24 June 2014 15:27
|
|
|
Re: Calculating Median Ages
By: Liz-DHS on Tue, 24 June 2014 15:54
|
|
|
Re: Calculating Median Ages
By: hlantos on Tue, 24 June 2014 17:00
|
|
|
Re: Calculating Median Ages
By: hlantos on Tue, 08 July 2014 09:58
|
|
|
Re: Calculating Median Ages
By: hlantos on Tue, 08 July 2014 10:15
|
|
|
Re: Calculating Median Ages
By: Liz-DHS on Tue, 08 July 2014 11:40
|
|
|
Re: Calculating Median Ages
|
|
|
Re: Calculating Median Ages
By: rbriceno on Wed, 05 November 2014 16:04
|
|
|
Re: Calculating Median Ages
By: Liz-DHS on Wed, 05 November 2014 16:35
|
|
|
Re: Calculating Median Ages
By: rbriceno on Thu, 06 November 2014 10:38
|
|
|
Re: Calculating Median Ages
By: Liz-DHS on Tue, 11 November 2014 11:33
|
Goto Forum:
Current Time: Tue Jan 14 08:46:20 Coordinated Universal Time 2025
|