Closed ahinton-mmc closed 4 years ago
Thanks for letting me know! The issue is that a call to bs()
produces a matrix with numbers as the column names, and since WeightIt
process formulas differently from lm()
to allow more customization, it didn't process those column names correctly. I've fixed this in the GitHub version of WeightIt
, which you can install with devtools::install_github("ngrewifer/WeightIt")
. I'll put it on CRAN early next week.
For future reference, when using reprex
, you need to library()
all the packages you're using, so the code you pasted was not really informative and it wasn't clear to me where the bs()
function was.
Thank you!!
Sent from Workspace ONE Boxer
On Jan 2, 2020 7:47 PM, Noah Greifer notifications@github.com wrote: This message originated outside of MaineHealth. Use caution when opening attachments, clicking links or responding to requests for information.
Thanks for letting me know! The issue is that a call to bs() produces a matrix with numbers as the column names, and since WeightIt process formulas differently from lm() to allow more customization, it didn't process those column names correctly. I've fixed this in the GitHub version of WeightIt, which you can install with devtools::install_github("ngrewifer/WeightIt"). I'll put it on CRAN early next week.
For future reference, when using reprex, you need to library() all the packages you're using, so the code you pasted was not really informative and it wasn't clear to me where the bs() function was.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ngreifer_WeightIt_issues_9-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DALXEKD3BBZNHVAP4VCA24JDQ32DLJA5CNFSM4KCGUNCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH76QHA-23issuecomment-2D570419228&d=DwMCaQ&c=ST5Jxgx_zZ9nYuPWkSm01Luus8kzn0TCuX9tmQgnWms&r=__BxrAQqu05nqQiE9hB_rg&m=E9QBbXa8o_MgMftl3J7Bn0WcrFJ3Vz0KReHbrxroFZw&s=W9t84Dhr3g_pYFksZxvusbraioNsf49tgfLxz8d-Q_k&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ALXEKDZVW2FAQM2CDAL3DO3Q32DLJANCNFSM4KCGUNCA&d=DwMCaQ&c=ST5Jxgx_zZ9nYuPWkSm01Luus8kzn0TCuX9tmQgnWms&r=__BxrAQqu05nqQiE9hB_rg&m=E9QBbXa8o_MgMftl3J7Bn0WcrFJ3Vz0KReHbrxroFZw&s=zZ5-Y9JN17XH-yTofFLHZRvbkF7fC7FMKHEtXlMFthc&e=.
CONFIDENTIALITY NOTICE: This email message, including any attachments, is for the use of the intended recipient(s) only and may contain information that is privileged, confidential, and prohibited from unauthorized disclosure under applicable law. If you are not the intended recipient of this message, any dissemination, distribution, or copying of this message is strictly prohibited. If you received this message in error, please notify the sender by reply email and destroy all copies of the original message and attachments.
I was using bs() within weightit() to include spline terms in my model, but I went to re-run my code and it is no longer working. I get the following error:
Error in terms.formula(new.form) : invalid model formula in ExtractVars
I'm not sure this is a bug in WeightIt, it may be something I'm doing wrong. Any help would be appreciated!
Thanks!
Created on 2020-01-02 by the reprex package (v0.2.1)