Lagged variables in formula

Open
#105 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
pandas, python
Domain
data

Research direction

The issue does not name files or tests. Start by reviewing Patsy's existing formula support and the requested EViews-style syntax; done would mean a documented, tested approach for lagged variables and weights without relying on external developments.

Written by the indexing model from the issue text.

Description

fixed in formulaic

Could it be possible that patsy support for lagged variables and weights be added? For an econometrician like me it would be of great help not to depend on external developments for working formulas like:

varalpha varalpha(-1) (((varbac*2.1)+(varbac(-1)*1.4)+(varbac(-2)*0.2)+(varbac(-3)0.3))/4) (((varac0.1)+(varac(-1)*3.5)+(varac(-2)*0.1)+(varac(-3)0.3))/4) (((varep2.4)+(varep(-1)*0.1)+(varep(-2)0.5))/3) (((varrl2.2)+(varrl(-2)*0.7)+(varrl(-3)0.1))/3) (((varrs0.8)+(varrs(-1)1.2))/2) (((vartc0.9)+(vartc(-1)*1.8)+(vartc(-2)*0.1)+(vartc(-3)1.2))/4) varaah (((vargs1.1)+(vargs(-1)*1.9)+(vargs(-2)*0.7)+(vargs(-3)0.3))/4) (((vargc0.1)+(vargc(-1)*3.6)+(vargc(-2)*0.1)+(vargc(-3)*0.2))/4)

that I used to work on EViews?

Python with Statsmodel, Pandas and Patsy is a very powerful working environment, but without this developing it is not of big use to econometricians.

Thanks

Dominant language
Python
Stars
990
Forks
106
Avg merge
7d 34m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pydata/patsy

All issues in pydata/patsy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.