Nick Cox Hello,
I was wondering if you could help me figure out how to get the sum of this formula, perhaps by using a forvalues loop,
the formula is: (age+1-k)^1.5
for example if k = 0,1,2,3 it would look like this:
gen weight3=(3+1-0)^1.5+(3+1-1)^1.5+(3+1-2)^1.5+(3+1-3)^1.5
I need the total as it is the denominator to another formula: (the picture in the centre)
Any help would be greatly appreciated!
Hanna
I was wondering if you could help me figure out how to get the sum of this formula, perhaps by using a forvalues loop,
the formula is: (age+1-k)^1.5
for example if k = 0,1,2,3 it would look like this:
gen weight3=(3+1-0)^1.5+(3+1-1)^1.5+(3+1-2)^1.5+(3+1-3)^1.5
I need the total as it is the denominator to another formula: (the picture in the centre)
Any help would be greatly appreciated!
Hanna

Comment