我正在尝试使用R中的MICE软件包来估算一些丢失的数据,但遇到一个奇怪的问题。当我尝试运行插补函数时,出现此错误:
Error in parse(text = x, keep.source = FALSE) :
<text>:1:362: unexpected 'in'
1: emale+educ+Black+White.NotHispanic+Hispanic+Protestant.evangelical+Protestant.other+Catholic+Jewish+Athiest_or_Agnostic+Unaffiliated+famwealth+employ+marstat+ownhome+health_6+pid7+ideo5+pew_re
^
我尝试将所有包含in
关键字的变量名都放在反引号中,但随后出现错误:
Error in check.blocks(blocks, data) :
The following names were not found in `data`: `inputstate`, `Mandatory.Minimums`, `healthins_6`, `Gini Index`, `Median income (dollars)`, `EDUCATIONAL ATTAINMENT - Less than high school graduate`, `Native; born in state of residence; Total population`
我正在使用CCES和ACS的数据,因此,如果问题出在其变量名上,我将不是唯一拥有它的人。我试图用模拟数据复制问题,但无法完成。