Comments (4)
Hi,
Can you provide me with a copy-pastable example that raises the issue?
Thanks,
Kevin
from linearmodels.
import linearmodels as plm
from linearmodels.datasets import wage_panel
df = wage_panel.load()
df = df.set_index(["nr","year"])
idx = df.index
df = df.reset_index()
df.index=idx
fm = 'lwage ~ C(year)*educ + union + EntityEffects'
model2 = plm.PooledOLS.from_formula(formula=fm,data=df).fit(cov_type='clustered',debiased=True, cluster_entity=True)
from linearmodels.
Kevin,
Below is the copy-paste code.
Python implementation: CPython
Python version : 3.10.9
IPython version : 8.10.0
Compiler : MSC v.1916 64 bit (AMD64)
OS : Windows
Release : 10
Machine : AMD64
Processor : Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
CPU cores : 20
Architecture: 64bit
linearmodels: 4.31
import linearmodels as plm
from linearmodels.datasets import wage_panel
df = wage_panel.load()
df = df.set_index(["nr","year"])
idx = df.index
df = df.reset_index()
df.index=idx
fm = 'lwage ~ C(year)*educ + union + EntityEffects'
model2 = plm.PooledOLS.from_formula(formula=fm,data=df).fit(cov_type='clustered',debiased=True, cluster_entity=True)
null = 'C(year)[T.1984]:educ = 0'
model2.wald_test(formula=null)
FormulaSyntaxError: Unknown operator '['.
C(year)⧛[⧚T.1987]:educ
null = 'C(year,Treatment(1984)):educ = 0'
model2.wald_test(formula=null)
FormulaSyntaxError: Unknown operator ':'.
C(year,Treatment(1984))⧛:⧚educ = 0
from linearmodels.
I think you need to escale terms that are not valid Python, e.g.,
null = '`C(year,Treatment(1984)):educ` = 0'
Note the ticks around the entire variable name. I'll need to check that this works, but it should.
Note: There was a recently fixed regression in formulaic that might affect escaping. This should be fixed in the next release of formulaic.
from linearmodels.
Related Issues (20)
- Variables order in results HOT 8
- Tests fail to run: E ModuleNotFoundError: No module named 'interface_meta' HOT 7
- Option to avoid MissingValueWarning warning. HOT 3
- Suggestion: Implement a `.remove_data` function for Results
- Min. obs pr Entities/Time Periods is sometimes reported as 0 HOT 3
- Small sample correction clustered avaialble? HOT 2
- Clustered standard errors in `lineramodels` and `statsmodels` HOT 3
- Fixed-effect `p-value` with clustered covariance differs from Stata HOT 2
- PanelOLS : Dropping absorbed variables doesn't work with sample weights HOT 2
- 14 tests fail HOT 2
- ENH: Implement 2+ fixed-effect with multi-way clustering OLS
- Estimated Effects in random effect HOT 7
- Different results for Random Effects models for Python vs Stata HOT 5
- Fixed effects std. error and p-values HOT 2
- Sanitize extra text from summary
- Interaction terms for Categorical Variables in a RE Model HOT 4
- Typo in doc in Driscoll-Kraay formula
- How to fit LIML with 1 endogenous variable, 1 instrument, including an intercept HOT 11
- MemoryError with IV2SLS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linearmodels.