Comments (1)
Edit: not strange things, likely desired behavior by formulaic
.
Example:
from formulaic import model_matrix
import numpy as np
import pandas as pd
N = 100
X = np.random.normal(0, 1, N)
Y = np.random.choice([0, 1], N, True)
df = pd.DataFrame({
'X':X,
'Y':Y
})
df.Y = df.Y.astype(str)
df.Y = pd.Categorical(Y)
df.head()
df.dtypes
model_matrix("Y ~ X", df)
# .lhs
# Y[T.0] Y[T.1]
# 0 1 0
# 1 1 0
# 2 0 1
# 3 1 0
# 4 1 0
# .. ... ...
# 95 1 0
# 96 0 1
# 97 0 1
# 98 1 0
# 99 1 0
this gives a lhs with two columns. In this case, throw an error.
from pyfixest.
Related Issues (20)
- Future Feature Development
- Fix Python 3.8 Type hint bug
- Implement the Local Projections DiD Estimator
- Add R2 Metric to etable output
- Issue with 'n_excl' HOT 3
- Enhancing _detect_singletons HOT 2
- allow a matrix to be passed to predict() via `newdata`
- Support Polars HOT 7
- Bug in dimension due to multicollinearity
- Collinearity checking bug in FEIV HOT 4
- Use R2U to speed up CI
- i() interaction i_ref arguments fail / do not drop variables under formulaic 1.0.0 HOT 1
- Issue with `predict` when dropping collinear covariates on new data HOT 7
- Bug in predict with missing data in `newdata`
- Regression introduced with 0.11.7: incorrect columns dropped due to multicollinearity
- "The Effect" Notebook is Broken
- Make `lets-plot` dependency optional
- Move docs to `quartodoc`, generally improve documentation and fix docstrings
- Two issues in v0.13.0 HOT 7
- Why do standard errors slightly deviate between `PyFixest` and `fixest`?
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 pyfixest.