0
LaLonde 데이터 세트에서 MatchIt 패키지를 사용하고 있으며 discard 인수가 두 가지 유형의 오류를 생성하고 있습니다. (discard 인수를 사용하지 않으면 코드가 작동합니다.) 두 경우 모두, 내가하려고 할 때R - Matchit - 성향 점수 매칭 - 폐기 기능이 작동하지 않습니다.
첫 번째 문제는 .... 문제를 해결하는 방법하지 분명하다 discard = "hull.control"
이 오류 메시지가 생성됩니다
m.opt1 <- matchit(treat ~ inc.re74 + inc.re75 + education + nonwhite +
age + nodegree, data = cps_controls, method = "optimal", ratio=1,
discard="hull.control")
....
Loading required namespace: WhatIf
Preprocessing data ...
Performing convex hull test ...
Error in mclapply(1:m, in_ch, mc.cores = mc.cores) :
'mc.cores' > 1 is not supported on Windows
내가
discard = "control"
Error in d[i, ] <- abs(d1[i] - d0) :
number of items to replace is not a multiple of replacement length
을하려고 할 때
두 번째 문제는 워싱턴이 거기에있다 이 중 하나를 해결하려면? 감사!!
"lalonde"데이터 또는 "cps_controls"데이터를 사용하고 있습니까? 후자는 문제를 재현 할 수있는 데이터 예제를 추가하십시오. – jaySf
안녕하세요, cps_controls를 사용하고 있었지만 MatchIt 패키지에서 사용할 수있는 lalonde 데이터 세트를 사용하여 다시 시도했습니다. –
위의 첫 번째 문제와 두 번째 문제에 대한 새로운 오류에 대해 동일한 오류가 발생했습니다. 사용 - 다시 discard 인수를 사용하지 않으면 작동합니다 : m.opt <- matchit (~ re74 + re75 + education + black + hispan + age, data = lalonde, method = "optimal", ratio = 2) –