Array I can't find this reported before, and I am pretty sure it's NOT my data.
Array
Above, the relevant bits. Age is an integer variable taking on values in [0, 120].
At the extreme end of the distribution, there are 8 cases aged 111 or older.
NOW. if I plot a histogram of this:
hist age if age > 110, w(1) freq (i.e with unit bins), I get the following, where the 4 elements at 120 are plotted as if they are 119.
Array
SAY WHAT?
And this happens with other variables in the same data set: the final category gets (arbitrarily) combined with the PENULTIMATE category, even if one specifies w(1). Unfortunately data are sensitive, but here is a largely meaningful demo:
The below is a tabulate of frequencies of deaths by date of death in recent weeks for some population. Note the 111 at 24 and 25 jul; the 110 at 26 jul; and the most recent numbers of 94 and 62.
Array
Plotting a histogram of the same, and suddenly the data for 27 July reflect 156 (being 94 + 62)
Array
Related Posts with Curious histogram glitch?
Adding new rows for each group setHello all, I am working a matched case-control study (matched on age and sex). In the below example…
Cross Sectional and year dummyI am running probit for cross-sectional data that runs for several years (each individual still appe…
Age, gender and BMI matched controls in STATAHello everyone, I am working on a study with 471 Normal Glucose Tolerance(non-diabetic) and 153 (Ty…
cross-sectional regression modified Jones model 1995Hi, I'm running a cross- sectional regression based on modified Jones model to calculate discretiona…
cumulative distribution function vs probability density functionHi everyone, According to my lecture slides you can compute the Marginal Effects for continuous X f…
Subscribe to:
Post Comments (Atom)
0 Response to Curious histogram glitch?
Post a Comment