{"action":"created","issue":{"url":"https://api.github.com/repos/markmfredrickson/optmatch/issues/103","repository_url":"https://api.github.com/repos/markmfredrickson/optmatch","labels_url":"https://api.github.com/repos/markmfredrickson/optmatch/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/markmfredrickson/optmatch/issues/103/comments","events_url":"https://api.github.com/repos/markmfredrickson/optmatch/issues/103/events","html_url":"https://github.com/markmfredrickson/optmatch/issues/103","id":90188935,"number":103,"title":"update `fill.NAs` semantics re `scores`, NA handling","user":{"login":"benthestatistician","id":827606,"avatar_url":"https://avatars.githubusercontent.com/u/827606?v=3","gravatar_id":"","url":"https://api.github.com/users/benthestatistician","html_url":"https://github.com/benthestatistician","followers_url":"https://api.github.com/users/benthestatistician/followers","following_url":"https://api.github.com/users/benthestatistician/following{/other_user}","gists_url":"https://api.github.com/users/benthestatistician/gists{/gist_id}","starred_url":"https://api.github.com/users/benthestatistician/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benthestatistician/subscriptions","organizations_url":"https://api.github.com/users/benthestatistician/orgs","repos_url":"https://api.github.com/users/benthestatistician/repos","events_url":"https://api.github.com/users/benthestatistician/events{/privacy}","received_events_url":"https://api.github.com/users/benthestatistician/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/markmfredrickson/optmatch/labels/bug","name":"bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"login":"josherrickson","id":1674171,"avatar_url":"https://avatars.githubusercontent.com/u/1674171?v=3","gravatar_id":"","url":"https://api.github.com/users/josherrickson","html_url":"https://github.com/josherrickson","followers_url":"https://api.github.com/users/josherrickson/followers","following_url":"https://api.github.com/users/josherrickson/following{/other_user}","gists_url":"https://api.github.com/users/josherrickson/gists{/gist_id}","starred_url":"https://api.github.com/users/josherrickson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josherrickson/subscriptions","organizations_url":"https://api.github.com/users/josherrickson/orgs","repos_url":"https://api.github.com/users/josherrickson/repos","events_url":"https://api.github.com/users/josherrickson/events{/privacy}","received_events_url":"https://api.github.com/users/josherrickson/received_events","type":"User","site_admin":false},"milestone":null,"comments":28,"created_at":"2015-06-22T19:29:39Z","updated_at":"2016-03-18T22:16:10Z","closed_at":null,"body":"While we're making adjustments to `fill.NAs` (cf #100), let's also enable some special handling of `strata` terms in the calling argument, to match functionality and semantics we're committing to elsewhere (e.g. #87).\r\n1. In contrast to other terms on the RHS of the formula arg, `NA`s in a `strata` term should be interpreted as instructions to leave the designated units out of the match, and passed through. (As with NAs on the LHS are.)\r\n2. Therefore no need to expand `strata` factors into a dummy variable representation; pass them through as-is. (I.e., no columns of returned data frame labeled \"strata\"; instead, if the formula contained `strata(eyecolor)` then it just has an `eyecolor` column, and if it's `strata(taken + passed)` then there are columns `taken` and `passed`.) \r\n3. In the formula associated with that data frame, ie its \"terms\" attribute, do retain `strata` calls. So that functions applied to the result of `fill.NAs` will be able to recognize strata terms. In addition, use the \"terms\" attribute of the returned model frame to flag them as specials, specifically \"strata\" specials. (Related code, if not necessarily model code, appears in [my `ppse.glm` implementation](https://github.com/benthestatistician/psm/blob/master/ppse.R), at least as of [this commit](https://github.com/benthestatistician/psm/blob/6626bea39f2306a6ef34d81321e45bb818abbc01/ppse.R).)"},"comment":{"url":"https://api.github.com/repos/markmfredrickson/optmatch/issues/comments/198563681","html_url":"https://github.com/markmfredrickson/optmatch/issues/103#issuecomment-198563681","issue_url":"https://api.github.com/repos/markmfredrickson/optmatch/issues/103","id":198563681,"user":{"login":"benthestatistician","id":827606,"avatar_url":"https://avatars.githubusercontent.com/u/827606?v=3","gravatar_id":"","url":"https://api.github.com/users/benthestatistician","html_url":"https://github.com/benthestatistician","followers_url":"https://api.github.com/users/benthestatistician/followers","following_url":"https://api.github.com/users/benthestatistician/following{/other_user}","gists_url":"https://api.github.com/users/benthestatistician/gists{/gist_id}","starred_url":"https://api.github.com/users/benthestatistician/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benthestatistician/subscriptions","organizations_url":"https://api.github.com/users/benthestatistician/orgs","repos_url":"https://api.github.com/users/benthestatistician/repos","events_url":"https://api.github.com/users/benthestatistician/events{/privacy}","received_events_url":"https://api.github.com/users/benthestatistician/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T22:16:10Z","updated_at":"2016-03-18T22:16:10Z","body":"Re @markmfredrickson's comments: Now that (if I'm not mistaken) `scores` and `match_on.glm`/`match_on.bigglm` et al. scan their first argument for NAs, applying `fill.NAs()` and then refitting in the event that NAs are found, greasing the wheels for users to invoke `fill.NAs` directly feels a little less pressing.\r\n\r\nThat said, I'm also eager to see what comes of the the fill.NAs as objects -branch, for this and other reasons also."}}