In [1]:
from math import log,exp
import numpy as np
import pandas as pd
In [2]:
def menopauseAge(age, amh):
    return np.power(-np.log(0.5),0.060388) * exp(3.18019 + 0.1608897 * amh + 0.016068 * age)
In [3]:
amhRows = np.arange(0,4.5,0.1)
ageCol = range(33,52)
amhAge = [[np.round(menopauseAge(age,amh),1) for age in ageCol] for amh in amhRows]
df = pd.DataFrame(amhAge, index=amhRows,columns=ageCol)
df
Out[3]:
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
0.0 40.0 40.6 41.3 42.0 42.6 43.3 44.0 44.7 45.5 46.2 46.9 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4
0.1 40.6 41.3 42.0 42.6 43.3 44.0 44.7 45.5 46.2 46.9 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3
0.2 41.3 42.0 42.6 43.3 44.0 44.7 45.5 46.2 46.9 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1
0.3 42.0 42.6 43.3 44.0 44.7 45.5 46.2 46.9 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0
0.4 42.6 43.3 44.0 44.7 45.5 46.2 46.9 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9
0.5 43.3 44.0 44.7 45.5 46.2 47.0 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9
0.6 44.0 44.7 45.5 46.2 47.0 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8
0.7 44.7 45.5 46.2 47.0 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.7
0.8 45.5 46.2 47.0 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.7 60.7
0.9 46.2 47.0 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7
1.0 47.0 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7
1.1 47.7 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7
1.2 48.5 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8
1.3 49.3 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8
1.4 50.1 50.9 51.7 52.5 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9
1.5 50.9 51.7 52.6 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0
1.6 51.7 52.6 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1
1.7 52.6 53.4 54.3 55.1 56.0 56.9 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2
1.8 53.4 54.3 55.1 56.0 57.0 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3
1.9 54.3 55.2 56.0 57.0 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5
2.0 55.2 56.0 57.0 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.6
2.1 56.0 57.0 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.8
2.2 57.0 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.8 76.1
2.3 57.9 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.8 76.1 77.3
2.4 58.8 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.8 76.1 77.3 78.5
2.5 59.8 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.8 76.1 77.3 78.5 79.8
2.6 60.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.5 79.8 81.1
2.7 61.7 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.5 79.8 81.1 82.4
2.8 62.7 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8
2.9 63.7 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1
3.0 64.8 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5
3.1 65.8 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9
3.2 66.9 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3
3.3 68.0 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8
3.4 69.1 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8 92.3
3.5 70.2 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8
3.6 71.3 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8 95.3
3.7 72.5 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8 95.3 96.8
3.8 73.7 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8 95.3 96.8 98.4
3.9 74.9 76.1 77.3 78.6 79.8 81.1 82.4 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8 95.3 96.8 98.4 100.0
4.0 76.1 77.3 78.6 79.8 81.1 82.5 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8 95.3 96.8 98.4 100.0 101.6
4.1 77.3 78.6 79.8 81.1 82.5 83.8 85.1 86.5 87.9 89.3 90.8 92.3 93.8 95.3 96.8 98.4 100.0 101.6 103.3
4.2 78.6 79.8 81.1 82.5 83.8 85.1 86.5 87.9 89.4 90.8 92.3 93.8 95.3 96.8 98.4 100.0 101.6 103.3 104.9
4.3 79.8 81.1 82.5 83.8 85.1 86.5 87.9 89.4 90.8 92.3 93.8 95.3 96.8 98.4 100.0 101.6 103.3 104.9 106.6
4.4 81.1 82.5 83.8 85.2 86.5 87.9 89.4 90.8 92.3 93.8 95.3 96.8 98.4 100.0 101.6 103.3 104.9 106.6 108.4
In [ ]:
 
In [4]:
#rough estimate for age 25 or older
def simpleMenopauseAge(age, amh):
    return (35.2 + 0.7*((age-25)+(amh*10)))
In [5]:
amhAge2 = [[np.round(simpleMenopauseAge(age,amh),1) for age in ageCol] for amh in amhRows]
df = pd.DataFrame(amhAge2, index=amhRows,columns=ageCol)
df
Out[5]:
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
0.0 40.8 41.5 42.2 42.9 43.6 44.3 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4
0.1 41.5 42.2 42.9 43.6 44.3 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1
0.2 42.2 42.9 43.6 44.3 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8
0.3 42.9 43.6 44.3 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5
0.4 43.6 44.3 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2
0.5 44.3 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9
0.6 45.0 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6
0.7 45.7 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3
0.8 46.4 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0
0.9 47.1 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7
1.0 47.8 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4
1.1 48.5 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1
1.2 49.2 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8
1.3 49.9 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5
1.4 50.6 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2
1.5 51.3 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9
1.6 52.0 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6
1.7 52.7 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3
1.8 53.4 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0
1.9 54.1 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7
2.0 54.8 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4
2.1 55.5 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1
2.2 56.2 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8
2.3 56.9 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5
2.4 57.6 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2
2.5 58.3 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9
2.6 59.0 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6
2.7 59.7 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3
2.8 60.4 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0
2.9 61.1 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7
3.0 61.8 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4
3.1 62.5 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1
3.2 63.2 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8
3.3 63.9 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5
3.4 64.6 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2
3.5 65.3 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9
3.6 66.0 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6
3.7 66.7 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3
3.8 67.4 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0
3.9 68.1 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0 80.7
4.0 68.8 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0 80.7 81.4
4.1 69.5 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0 80.7 81.4 82.1
4.2 70.2 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0 80.7 81.4 82.1 82.8
4.3 70.9 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0 80.7 81.4 82.1 82.8 83.5
4.4 71.6 72.3 73.0 73.7 74.4 75.1 75.8 76.5 77.2 77.9 78.6 79.3 80.0 80.7 81.4 82.1 82.8 83.5 84.2
In [ ]:
 
In [ ]:
 
In [ ]: