Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
.idea
# Python
__pycache__/
*.py[cod]

# Virtual environments
.venv/
venv/

# Packaging / build artifacts
*.egg-info/
build/
dist/

# Testing and coverage
.pytest_cache/
.coverage
.coverage.*
htmlcov/
coverage.xml

# Jupyter
.ipynb_checkpoints

# Editors / IDEs
.idea/
.vscode/

# Project specific
backup/
2 changes: 1 addition & 1 deletion sensemakr/sensitivity_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def extract_from_model(model, treatment, benchmark_covariates, kd, ky, r2dz_x, r
se = model_data['se']
dof = model_data['dof']
try:
estimate, se = float(estimate), float(se)
estimate, se = float(estimate.iloc[0]), float(se.iloc[0])
except:
sys.exit('Error: The estimated effect and standard error must be numeric.')

Expand Down
2 changes: 1 addition & 1 deletion sensemakr/sensitivity_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def partial_r2(model=None, covariates=None, t_statistic=None, dof=None):
model_data = model_helper(model, covariates=covariates)
t_statistic = model_data['t_statistics']
dof = model_data['dof']
return (t_statistic ** 2 / (t_statistic ** 2 + dof))[0] # extracts float
return (t_statistic ** 2 / (t_statistic ** 2 + dof)).iloc[0] # extracts float
else:
return t_statistic ** 2 / (t_statistic ** 2 + dof)

Expand Down
Loading