Hi there,
Thanks for the useful code. I have been exploring the R files and noticed what I believe to be a small error in the FE_CBR.R file.
The range specified on line 58 in ASFRur$ASFR[2:15] misses the first value in the column and also generates an NA as the last value, since it is outside the range of the original column. The results in our final CBRres table having an incorrect urban fertility rate value and an NA for rural fertility rate value.
Changing the code to ASFRur$ASFR[1:14] gives the correct range from the column and CBRres results then match those I see on statcompiler.com. Unless I've misinterpreted something, can the code be adjusted accordingly?
Cheers.
Hi there,
Thanks for the useful code. I have been exploring the R files and noticed what I believe to be a small error in the FE_CBR.R file.
The range specified on line 58 in ASFRur$ASFR[2:15] misses the first value in the column and also generates an NA as the last value, since it is outside the range of the original column. The results in our final CBRres table having an incorrect urban fertility rate value and an NA for rural fertility rate value.
Changing the code to ASFRur$ASFR[1:14] gives the correct range from the column and CBRres results then match those I see on statcompiler.com. Unless I've misinterpreted something, can the code be adjusted accordingly?
Cheers.