timriffe / DemoTools

Tools for the evaluation, adjustment, and standardization of demographic data
https://timriffe.github.io/DemoTools
Other
59 stars 31 forks source link

Adds child/oldage adjustment for mig_beta #234

Closed cimentadaj closed 3 years ago

cimentadaj commented 3 years ago

Summary:

Child adjust:

Old age adjustment:

Let me know if you need me to change stuff. I'll commit here as needed.

timriffe commented 3 years ago

will have a look, thanks!

timriffe commented 3 years ago

Commenting here, I know not ideal, but: -[ ] let's not hard code the returned age-range in mig_beta(). The required range can be detected from mat_resid$age or similar -[ ] add max age arg for child adjust? requires look at mig_beta_cwr()currently I think only cohorts born between censuses get the adjustment? Maybe that's an OK default, but would be nice to allow the user to declare a max age to override it. You can pass on this one if it's a pain now.

There may be other things, but these are just things I noticed by eyeballing and no need to rush at this point. I'll pass this to road test

peterdavjohnson commented 3 years ago

Hi all,

I am noticing several things:

  1. The CWR needs a factor (which defaults to 0.3 in the workbook). See the description in the (somewhat incomplete) Help tab of the file ResidualMigBetaZGa-CWR-NoMA2000.xlsm.
  2. The estimate of migrants age 0 is negative while all other ages are positive.

See my revised comparison code and other files in Google drive folder *WPP_Methods

Tools > Templates > ResidualMigBeta*.

Here are the graphs: [image: image.png] [image: image.png] Let me know if you have any questions, pj

On Sun, Apr 18, 2021 at 4:14 PM Tim Riffe @.***> wrote:

Commenting here, I know not ideal, but: [ ] let's not hard code the returned age-range in mig_beta(). The required range can be detected from mat_resid$age or similar [ ] add max age arg for child adjust? requires look at mig_beta_cwr()currently I think only cohorts born between censuses get the adjustment? Maybe that's an OK default, but would be nice to allow the user to declare a max age to override it. You can pass on this one if it's a pain now.

There may be other things, but these are just things I noticed by eyeballing and no need to rush at this point. I'll pass this to road test

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/timriffe/DemoTools/pull/234#issuecomment-822053798, or unsubscribe https://github.com/notifications/unsubscribe-auth/APAK5QRENUPEMZ2WERYLSM3TJM4SRANCNFSM43ERZOGQ .