@@ -1053,7 +1053,7 @@ def test_transfer_function_bayesian_adstock_only(mock_pymc_sample):
10531053 2. Correct number of MCMC chains and draws
10541054 3. Transform parameters are estimated (half_life in posterior)
10551055 4. Plot and summary methods work
1056- 5. Convergence diagnostics are reasonable
1056+ 5. Half-life posterior is reasonable
10571057 """
10581058 # Generate synthetic data
10591059 np .random .seed (42 )
@@ -1127,10 +1127,6 @@ def test_transfer_function_bayesian_adstock_only(mock_pymc_sample):
11271127 assert "beta" in result .model .idata .posterior
11281128 assert "theta_treatment" in result .model .idata .posterior
11291129
1130- # Test convergence (r_hat should be close to 1)
1131- summary = az .summary (result .model .idata , var_names = ["half_life" , "theta_treatment" ])
1132- assert all (summary ["r_hat" ] < 1.1 ), "R-hat values suggest poor convergence"
1133-
11341130 # Test plotting
11351131 fig , ax = result .plot ()
11361132 assert isinstance (fig , plt .Figure )
@@ -1155,7 +1151,7 @@ def test_transfer_function_ar_bayesian(mock_pymc_sample):
11551151 2. Correct number of MCMC chains and draws
11561152 3. Transform parameters (half_life) and AR parameter (rho) are in posterior
11571153 4. Plot and summary methods work
1158- 5. Convergence diagnostics are reasonable
1154+ 5. Parameter posteriors are reasonable (bounded, positive where expected)
11591155 """
11601156 # Generate synthetic data with AR(1) errors
11611157 np .random .seed (42 )
@@ -1250,12 +1246,6 @@ def test_transfer_function_ar_bayesian(mock_pymc_sample):
12501246 assert "beta" in result .model .idata .posterior
12511247 assert "theta_treatment" in result .model .idata .posterior
12521248
1253- # Test convergence (r_hat should be close to 1)
1254- summary = az .summary (
1255- result .model .idata , var_names = ["half_life" , "theta_treatment" , "rho" ]
1256- )
1257- assert all (summary ["r_hat" ] < 1.1 ), "R-hat values suggest poor convergence"
1258-
12591249 # Test plotting
12601250 fig , ax = result .plot ()
12611251 assert isinstance (fig , plt .Figure )
0 commit comments