Pass through interval-censored Cox fitting progress to stderr

This commit is contained in:
RunasSudo 2023-04-21 18:10:40 +10:00
parent fd30a3c1c7
commit 53a0e98227
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 4 additions and 1 deletions

View File

@ -697,9 +697,12 @@ class IntervalCensoredCox(RegressionModel):
csv_str = csv_buf.getvalue()
# Run intcens binary
proc = subprocess.run([config.hpstat_path, 'intcox', '-', '--output', 'json'], input=csv_str, capture_output=True, encoding='utf-8', check=True)
proc = subprocess.run([config.hpstat_path, 'intcox', '-', '--output', 'json'], input=csv_str, stdout=subprocess.PIPE, stderr=None, encoding='utf-8', check=True)
raw_result = json.loads(proc.stdout)
from IPython.display import clear_output
clear_output(wait=True)
z_critical = -stats.norm.ppf(config.alpha / 2)
result.terms = {raw_name: SingleTerm(
raw_name=raw_name,