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

programmatic construction for lead/lag #176

Merged
merged 4 commits into from
Mar 4, 2020

Conversation

kleinschmidt
Copy link
Member

Came up on slack: this adds methods for lead and lag that take a term and an optional number of steps and creates the appropriate LeadLagTerm object. So you can do things like

f = term(:y) ~ lead(term(:x), 3)

which is equivalent to

f2 = @formula(y ~ lead(x, 3))

@kleinschmidt
Copy link
Member Author

@oxinabox I'd like your feedback but can't request a review...

@codecov-io
Copy link

codecov-io commented Feb 22, 2020

Codecov Report

Merging #176 into master will increase coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #176      +/-   ##
=========================================
+ Coverage   86.47%   86.6%   +0.13%     
=========================================
  Files           9       9              
  Lines         510     515       +5     
=========================================
+ Hits          441     446       +5     
  Misses         69      69
Impacted Files Coverage Δ
src/StatsModels.jl 100% <ø> (ø) ⬆️
src/temporal_terms.jl 84% <100%> (+4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 749fdcd...c6521dd. Read the comment docs.

@kleinschmidt kleinschmidt merged commit 734b2f0 into master Mar 4, 2020
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

Successfully merging this pull request may close these issues.

3 participants