Skip to content
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

ERROR: LoadError: UndefVarError: @formula not defined #38

Open
lauswullum opened this issue Jul 8, 2022 · 1 comment
Open

ERROR: LoadError: UndefVarError: @formula not defined #38

lauswullum opened this issue Jul 8, 2022 · 1 comment

Comments

@lauswullum
Copy link
Contributor

Hi, Thanks for writing this package.

Potential bug

I found a potential bug, where @formula from StatsModels.jl is not automatically available
when only writing
using Survival
without
using StatsModels

MWE to reproduce the problem

using Survival
using StatsBase
using DataFrames
event = EventTime.(10 .+ randn(10), sample([true, false], 10))
coxph(@formula(events ~ x), DataFrame(x = randn(10), events = event))

output:

ERROR: LoadError: UndefVarError: @formula not defined
@ararslan
Copy link
Member

Good catch. Not a bug per se but it would be a good improvement to re-export @formula from StatsModels. Should be as simple as adding @formula to the export list. This would also allow us to remove the dependency on StatsModels in the docs/ project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants