Gaze-survival API¶
The public survival surface is vendor-neutral and lives in eyeprocesspy.survival.
Preparation and validation¶
Construct the canonical one-row-per-trial gaze-survival table.
Absence of a target event becomes right censoring only when events is
supplied and a complete usable trial observation window is known. Without
event evidence, callers must provide event_observed explicitly.
Source code in src/eyeprocesspy/survival.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | |
Validate canonical gaze-survival rows without modifying them.
Source code in src/eyeprocesspy/survival.py
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | |
Summarize observed, censored, and review-required trials.
Source code in src/eyeprocesspy/survival.py
Descriptive survival¶
Estimate Kaplan-Meier survival curves for gaze latency.
Source code in src/eyeprocesspy/survival.py
Estimate event-time quantiles from KM or fitted models.
Source code in src/eyeprocesspy/survival.py
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 | |
Models¶
Fit a Cox PH model, optionally with cluster-robust uncertainty.
Source code in src/eyeprocesspy/survival.py
Fit a repeated-participant Cox model.
Python currently provides participant-clustered sandwich uncertainty. It
does not mislabel this estimator as latent frailty. structure='frailty'
fails explicitly; R eyeprocess provides the frailty implementation.
Source code in src/eyeprocesspy/survival.py
Fit an explicitly selected Weibull or log-normal AFT model.
Estimation is delegated to the specialist lifelines survival backend; eyeprocesspy owns validation, provenance, and semantic output rather than reimplementing the AFT likelihood.
Source code in src/eyeprocesspy/survival.py
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
Predict survival probabilities at requested times.
Source code in src/eyeprocesspy/survival.py
Summarize fitted models without implying a cross-family winner.
Cox information criteria use partial likelihood; AFT information criteria use full likelihood. The returned comparability flag is therefore false when these bases are mixed or analysis-row counts differ.
Source code in src/eyeprocesspy/survival.py
Fit explicitly requested estimators across named survival specifications.
specifications should contain separately prepared canonical survival
tables representing alternative AOIs, detectors, time origins, fixation
thresholds, or quality rules. No estimator is selected implicitly.
Source code in src/eyeprocesspy/survival.py
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 | |
Diagnostics, plots, and reporting¶
Evaluate Cox PH using Schoenfeld-residual time trends.
This is a scientific-contract analogue to survival::cox.zph; exact
numerical parity with R is not claimed.
Source code in src/eyeprocesspy/survival.py
Plot Kaplan-Meier gaze-survival curves.
Source code in src/eyeprocesspy/survival.py
Plot 1-KM for one target-event definition.
This is not a competing-risks cumulative-incidence estimator.
Source code in src/eyeprocesspy/survival.py
Plot discrete Nelson-Aalen hazard increments for descriptive use.
Source code in src/eyeprocesspy/survival.py
Plot Schoenfeld residuals against log event time for the first Cox term.
Source code in src/eyeprocesspy/survival.py
Return exponentiated Cox hazard ratios or AFT time ratios.
Source code in src/eyeprocesspy/survival.py
Create a concise manuscript-ready reporting bundle.
Source code in src/eyeprocesspy/survival.py
Synthetic examples¶
Generate deterministic synthetic trial windows and canonical event rows.
Source code in src/eyeprocesspy/survival.py
1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 | |
Generate a deterministic canonical censored gaze-latency example.