-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose brms:::validate_formula
?
#1676
Comments
I think it is indeed worth exposing these functions. And yes, they initial validation checks are done there. The data validation is however done differently in brmsterms, which is exposed to the user already. |
Thank you! I've also since used Caveat that this is just asking for help rather than improving the package (though I suppose this ask might prompt documentation if others might use these features) but I'm having trouble validating that "the variables written in the formula are in the data". Do you know which function I'd use to get this? Right now I have:
|
validate_data it should be.
Adam Howes ***@***.***> schrieb am Mi., 31. Juli 2024, 17:56:
… Thank you! I've also since used brms:::validate_newdata as another
potential one.
Caveat that this is just asking for help rather than improving the package
(though I suppose this ask might prompt documentation if others might use
these features) but I'm having trouble validating that "the variables
written in the formula are in the data". Do you know which function I'd use
to get this?
Right now I have:
formula <- brms:::validate_formula(formula, family = family, data = data)
# Using this here only for checking purposes: expect it catches some errors
brmsterms(formula)
—
Reply to this email directly, view it on GitHub
<#1676 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2AGYHJDWFCWXPXFSY23ZPD3JDAVCNFSM6AAAAABLWLSOTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQG4ZDAMZZGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks! I've been trying to use:
I'm having trouble as |
I think these questions should better be addressed on Stan discourse. Also please provide more context to what you are trying to achieve. based on the provided info I am not sure what is happening. |
Yep that's fair, I think a thread could be a better venue, so apologies for putting things here. I'll try to figure something out about my problem and if not make a thread on the discourse. Regarding the context, and feel free to ignore: What I was trying to achieve was to create a function called |
I think I would like to expose these functions only with brms 3.0 once some more changes to the validate_* functions have been made. |
Hi Paul,
I'm looking to use the function
brms:::validate_formula
as a part of an R package. See issue epinowcast/epidist#195.I wonder if you'd consider exposing this function as it might be useful for package developers relying on
brms
?Additionally, would you be able to advise on which checks
validate_formula
provides? I had previously implemented some checks (when I was using just a list of formula likelist(mu ~ 1, sigma ~ 1)
) and unit tests like:Are checks like these housed in
validate_formula
? They don't seem to be on inspection/initial testing I've done. Might something like this be elsewhere in thebrms
package? Want to avoid reinventing wheel etc.!Thanks very much for any help!
Adam
Edit: actually, similar question about exposing
brms:::validate_family
(also use that one!)The text was updated successfully, but these errors were encountered: