psidR icon indicating copy to clipboard operation
psidR copied to clipboard

Issue with running the "3 year test"

Open lleemmoo opened this issue 4 years ago • 1 comments

Hello,

Thank you for this great package, it will help me and my team a lot! I'm currently going through your code and I tried the 3 year test. I just copied it from your page with no alteration. After a bit more than one hour i got this error message:

Fehler in [.data.table(ind, , c(def.subsetter, c(ind.subsetter, as.character(ind.notnas))), : column(s) not found: Y2003

Before I try running my personal list of variables and everything I'd like to have this sorted such that I don't encounter this error with my work as it probably will take some time for generating the panel...

Thank you for taking your time

Best, Remo Agovic University of Zurich

Code:

cwf = openxlsx::read.xlsx(system.file(package="psidR","psid-lists","psid.xlsx")) head_age_var_name <- getNamesPSID("ER17013", cwf, years=c(2003,2005,2007)) educ = getNamesPSID("ER30323",cwf,years=c(2003,2005,2007)) famvars = data.frame(year=c(2003,2005,2007),age=head_age_var_name) indvars = data.frame(year=c(2003,2005,2007),educ=educ) build.panel(fam.vars=famvars,ind.vars=indvars,datadir="/Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit")

Console Output:

INFO [2021-05-29 08:53:31] downloading file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/FAM2003ER INFO [2021-05-29 08:53:33] now reading and processing SAS file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/FAM2003ER into R INFO [2021-05-29 08:58:21] downloading file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/FAM2005ER INFO [2021-05-29 08:58:22] now reading and processing SAS file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/FAM2005ER into R INFO [2021-05-29 09:02:47] downloading file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/FAM2007ER INFO [2021-05-29 09:02:49] now reading and processing SAS file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/FAM2007ER into R INFO [2021-05-29 09:10:46] downloading file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/IND2019ER INFO [2021-05-29 09:11:31] now reading and processing SAS file /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/IND2019ER into R INFO [2021-05-29 09:58:37] finished downloading files to /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/ INFO [2021-05-29 09:58:37] continuing now to build the dataset INFO [2021-05-29 09:58:37] psidR: Loading Family data from .rda files INFO [2021-05-29 09:58:51] psidR: loaded individual file: /Users/remoagovic/Documents/Uni/FS 21/Program Evaluation/Final Project/R/Panel/TestGit/IND2019ER.rda INFO [2021-05-29 09:58:51] psidR: total memory load in MB: 1538 INFO [2021-05-29 09:58:51] psidR: currently working on data for year 2003 Fehler in [.data.table(ind, , c(def.subsetter, c(ind.subsetter, as.character(ind.notnas))), : column(s) not found: Y2003

lleemmoo avatar May 29 '21 08:05 lleemmoo

Hi! We obtain the same issue trying to run a very similar exercise.

chiefrockano1 avatar May 29 '21 10:05 chiefrockano1