Re: Time to failure problem



Nic...

With some risk of sounding pigheaded, I've read this several times this
morning...

"What im trying to do it to simulate a population of patients at time=0
and with a starting age ~N(70,7.3) and simulate for each patient, given
their simulated starting age how long it takes for them to have an
event. I am further assuming that each patient lives to 100."

"I know that i could test each patient annually to see if an event
occurs using the annual probability of an event, but this is going to
be part of much larger, more complicated simlation and i want to be
able to take a patient aged 70 say and jump straight to the year they
have an event with the minimum amount of calculations."

.... and I'm having some problems with it.

In particular...

"...simulate for each patient, given their simulated starting age how
long it takes for them to have an event."

"...i want to be able to take a patient aged 70 say and jump straight
to the year they have an event..."

There's no way to predict when a patient will have an event. We can
calculate the probability that a patient
will have an event before age 80, for instance. We can calculate the
prob that a patient will have an event
at some time during the period age 72 through age 72. But there will
always be a probability attached to
each statement.

The model we are using here works like this. Begin with a healthy man
who is age 65. Out of all the
men who are age 65 some will die before they reach age 66. We can
express this as a "rate" or
frequency... say 175 out of 10,000.... or if we are speaking of the
risk for one man, as a probability
pr = 0.0175.

Suppose this person reaches age 66. His prob of living until age 67 is
somewhat lower... his risk of
"failure" is a little larger. For those who enter age 66 the rate or
frequency of "failure" may be 188
out of 10,000. Hence this sinlge individual has a prob of failure of
0.0188. This increased rate
(for the remaining survivors) or risk expressed as a prob for an
individual steadily increases with
each additional year of age.

Now let's "start" this person at age 65 and calculate the prob that
this man will survive until age 95.
This means he must "not experience failure" for each year into the
future. This means we must
calculate a series of conditional probabilities... like, the prob of
surviving (not failing) age 65...
entering age 66... surviving age 66... etc. right on to age 95. These
are conditional because
each prob assumes he made it past the previous year. So if this person
is age 65 we can
calculate a cumulative prob that he will survive until age 95.

Now let's assume this person is still living at age 94. All of his past
"risks" are behind him. His
risk of "failing to achieve age 95" is just the prob of failure during
one year... the year in which
he is age 94.

Here's a parallel. Suppose that each year we buy one year of term life
insurance. Each year
the premium increases a little bit because our risk of living through
the next year is a little
worse than our risk for the previous year. Now let's go to the
insurance company and make
them an offer. We want to buy life insurance that covers the next 20
years. Aside from the time
value of money and other considerations (can we get some money back if
we die soon...?)
the insurance company promptly calculates the prob that we (that's just
one person) will
live for the next 20 years. Again, aside from the time value of money
etc. whether they
have to pay the face value of the policy next year or 18 years from now
is not relevant.
(Yes, I know it's relevant because of their ability to invest the
premium, etc.) So they
can estimate the prob that I'll live for another 20 years or for "X"
years and set the premium
accordingly.

But they cannot predict when I will die.

Now to your situation.

You have a population of patients which we'll assume are N(70, 7.3).
Some are in their
mid-50s and some are in their mid-80s. A patient age 55 has some prob
of achieving
age 95... he's got to "pass through" risks for each of his future
years. A patient age
85 has a higher risk of dying next year than does the patient age 55.
But the patient
age 85 has already "passed through" many years of risk and has only a
few remaining.

If we do the relevant calculations for the patient age 55 and also for
the patient age 85,
their cumulative curves (cum of prob of "an event") will be very
different.

This means that, if we want to obtain the probs for patients age 55,
56, 57, .... 84, 85
then we are going to need the cumulative "curve" for each of those
initial ages.
Then... if we intend to "Monte Carlo" these we are going to need a
fitting approximation
for each of those curves... an unpleasant task.

Another way to do this is the following.

Generate "data" from a N(70, 7.3)... this is easy... to establish the
initial age for a
hypothetical patient from that N(70, 7.3) population. Run that patient
"up the curve"
to age 85 or whatever. Generate another "random initial age" from
N(70, 7.3) and
do this again... etc. Then examine the distribution of the probs at,
say, age 85.

While this may seem like a heroic calculation, it's easily within your
grasp because
simulations of this sort are very fast on modern computers. There are
two commonly
used methods for generating random "normal" numbers with specified
average and
std. dev.

There is another way to play this. At this point I'm only trying to
imagine where you
want to go with this. You could do "as above" but terminate the
calculation for
each patient when the cumulative prob reaches a specified level... say
prob = 0.1
..... and report the age at which this happened... and then create the
distribution of
those ages. In effect, to transform N(70, 7.3) into the distribution
of ages are which
the cumulative risk reaches prob = 0.1.

But none of this can tell us "when a patient will suffer from an
event". We can only
document the amount of risk at various ages. OMU





Nicbrez wrote:
Hi OMU.

What im trying to do it to simulate a population of patients at time=0 and with a starting age ~N(70,7.3) and simulate for each patient, given their simulated starting age how long it takes for them to have an event. I am further assuming that each patient lives to 100.

I know that i could test each patient annually to see if an event occurs using the annual probability of an event, but this is going to be part of much larger, more complicated simlation and i want to be able to take a patient aged 70 say and jump straight to the year they have an event with the minimum amount of calculations.

Your help and interest is most appreciated.

Cheers

Nic

.



Relevant Pages

  • Re: formatting a calculated number field on a form
    ... >I'm not sure how you got the Age function to work at all in Access, ... I must use the date on which we last contacted the patient. ... into a spreadsheet using SQL queries that I contruct in the VBA code in the ... I just want control over the *display format* of a number that's ...
    (microsoft.public.access.forms)
  • Re: Vaccine query clarification
    ... If they received DPT at age 14, ... VACCINES TO BE MAILED TO HOME PLAN COPAY BILLED TO #2 HOME PLAN ... out of compliance so I could follow up with the patient. ... If there are 3 innoculations ...
    (microsoft.public.access.queries)
  • Vaccine query
    ... vaccines by the age of 2. ... My database can tell me if each patient is not up ... My query so far that would include the basic data is ...
    (microsoft.public.access.queries)
  • Re: Query to Select Maximum Age
    ... That should give you one record per patient, ... decided to take the record with their max age as more current. ... SELECT DISTINCT ptnum, age, sex, address ...
    (comp.databases.ms-access)
  • Re: Safety in Numbers
    ... we can see that both cycling and walking ... are in general low risk activities based on both per hour and also per ... and time was some hidden risks based on age. ... different ways for various reasons. ...
    (uk.rec.cycling)