Skip to content

Small subset error spotted in FE_CBR.R #7

Description

@apsteward90

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions