lukesonnet / KRLS

R package for machine learning technique to fit flexible, interpretable functional forms for continuous and binary outcomes.
Other
20 stars 12 forks source link

Warnings vs. errors in inference.krls2 #10

Closed lukesonnet closed 7 years ago

lukesonnet commented 7 years ago

Currently, if someone tries to get standard errors for KRLogit without truncation, we throw a warning but still return the pwmfx and the avg pwmfx. So if you do: summary(krls(X=X, y=y, loss='logistic')) you get a warning and no SEs but you get pwmfx. We could also error and force them to write: summary(krls(X=X, y=y, loss='logistic'), vcov = F) or we could change the default so it didn't try to get SEs without truncation, but I think that's worse than throwing the warning. So I think we currently have the right behavior, but I wanted to check.

If someone tries to get robust or clustered standard errors for KRLS without truncation, we throw a warning but still return the pwmfx and the avg pwmfx. So if you do: summary(krls(X=X, y=y), robust = T) you will get a warning telling you that you have to truncate, but still returning the PWMFX. The alternative is to error out, since this isn't default behavior, the user specified robust = T but I think the warning is sufficient. So again I think we have the right behavior, but this one I'm less sure about.

chadhazlett commented 7 years ago

Agreed, I like it as we have it.

On Jul 29, 2017 12:35, "Luke Sonnet" notifications@github.com wrote:

Currently, if someone tries to get standard errors for KRLogit without truncation, we throw a warning but still return the pwmfx and the avg pwmfx. So if you do: summary(krls(X=X, y=y, loss='logistic')) you get a warning and no SEs but you get pwmfx. We could also error and force them to write: summary(krls(X=X, y=y, loss='logistic'), vcov = F) or we could change the default so it didn't try to get SEs without truncation, but I think that's worse than throwing the warning. So I think we currently have the right behavior, but I wanted to check.

If someone tries to get robust or clustered standard errors for KRLS without truncation, we throw a warning but still return the pwmfx and the avg pwmfx. So if you do: summary(krls(X=X, y=y), robust = T) you will get a warning telling you that you have to truncate, but still returning the PWMFX. The alternative is to error out, since this isn't default behavior, the user specified robust = T but I think the warning is sufficient. So again I think we have the right behavior, but this one I'm less sure about.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lukesonnet/KRLS/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVCyO9RVSrUqWaOuC1bl_OXNIkTAB9Jks5sS19UgaJpZM4OnZlX .