richardli / SUMMER

SAE Unit/area Models and Methods for Estimation in R
https://richardli.github.io/SUMMER/
22 stars 6 forks source link

region variable not defined #17

Closed richardli closed 4 years ago

richardli commented 4 years ago

dear Richard! the getDirectList() functin failed to take the regionvar. returns Error in getDirect(births = births[[1]], years = years, regionVar = regionVar, : region variable not defined, and no v101 or v024!

Originally posted by @Awugchew in https://github.com/bryandmartin/SUMMER/issues/15#issuecomment-548161588

richardli commented 4 years ago

HI Awugchew, I believe you need to define the regionVar in the function call. For example, instead of

getDirect(births = births[[1]], years = years, regionVar = regionVar, ....)

Maybe

getDirect(births = births[[1]], years = years, regionVar = "v024", ....)

The ... are the rest of the arguments you provide. And the place I put down "v024" is the column name in the data that correspond to regions. Depending on the dataset you run, it may be another column, so just replace "v024" with that column name (and remember to put quotation marks around it).

Awugchew commented 4 years ago

thank you, Dr.  Z. Richard Lithat is a great help. It worked.   Stay Blessed! Awugchew Teshome Senior Environmental Health Lecturer, Researcher and Consultant MSc. Water and Health, MSc. Chemical/Environmental Engineering, MPH/Epidemiology Mobile; 0914970036 Haramaya University, Harer

On Friday, November 1, 2019, 04:28:39 PM GMT+3, Z. Richard Li <notifications@github.com> wrote:  

This message is eligible for Automatic Cleanup! (notifications@github.com) Add cleanup rule | More info

HI Awugchew, I believe you need to define the regionVar in the function call. For example, instead of

getDirect(births = births[[1]], years = years, regionVar = regionVar, ....)

Maybe

getDirect(births = births[[1]], years = years, regionVar = "v024", ....)

The ... are the rest of the arguments you provide. And the place I put down "v024" is the column name in the data that correspond to regions. Depending on the dataset you run, it may be another column, so just replace "v024" with that column name (and remember to put quotation marks around it).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.