Person-Time Analysis in jsurvival Module
ClinicoPath Development Team
2025-06-30
Source:vignettes/jsurvival-11-person-time-analysis-legacy.Rmd
jsurvival-11-person-time-analysis-legacy.Rmd
Introduction
Person-time analysis is a fundamental concept in epidemiology and survival analysis that accounts for the varying observation periods of study participants. The jsurvival module in ClinicoPath provides comprehensive person-time calculations and incidence rate analysis across its survival analysis functions.
What is Person-Time?
Person-time represents the total observation time contributed by all participants in a study while being at risk for the event of interest. Unlike simple participant counts, person-time captures both the number of subjects and their observation duration, providing accurate denominators for rate calculations.
Key Concepts
- Total Person-Time: Sum of all individual follow-up periods
-
Incidence Rate: Number of events ÷ Total
person-time
- Time Units: Typically expressed as person-days, person-months, or person-years
- Censoring: Properly accounts for participants leaving the study early
- Varying Follow-up: Handles different observation periods for each participant
Why Person-Time Matters
- Accurate Rate Calculations: Provides proper denominators for incidence rates
- Comparison Across Studies: Enables valid comparisons between populations with different follow-up patterns
- Adjustment for Time: Accounts for varying exposure periods in survival analysis
- Kaplan-Meier Foundation: Forms the basis for survival curve estimation
- Cox Model Integration: Essential for hazard ratio calculations
Person-Time in jsurvival Modules
The ClinicoPath jsurvival module includes person-time analysis in four key functions:
1. Time Interval Calculator
Purpose: Calculate time intervals that form the basis of person-time analysis
Features: - Date-based time calculations with multiple formats - Person-time concept explanation - Total person-time calculation - Landmark analysis support
Usage:
Analyses → Survival → Data Preparation → Time Interval Calculator
Key Outputs: - Time interval summary with total person-time - Educational information about person-time concepts - Calculated time variables for further analysis
2. Single Arm Survival
Purpose: Analyze survival for a single cohort with person-time metrics
Features: - Overall incidence rate calculation - Time-stratified person-time analysis - Confidence intervals using Poisson exact methods - Rate multiplier options (per 100, 1000 person-time units)
Usage:
Analyses → Survival → ClinicoPath Survival → Single Arm Survival
Enable: "Calculate Person-Time Metrics"
Key Outputs: - Person-time analysis table with rates and confidence intervals - Time-interval stratified analysis - Summary with interpretation
3. Survival Analysis (Univariate)
Purpose: Compare survival between groups with group-specific person-time analysis
Features: - Group-specific person-time calculations - Incidence rate comparisons between groups - Time-stratified analysis by group - Rate ratio calculations
Usage:
Analyses → Survival → ClinicoPath Survival → Survival Analysis
Enable: "Calculate Person-Time Metrics"
Key Outputs: - Person-time table by group - Group-specific incidence rates - Confidence intervals for each group - Overall and stratified summaries
4. Multivariable Survival
Purpose: Analyze survival with multiple covariates and person-time adjustment
Features: - Overall person-time with covariate stratification - Adjusted incidence rates - Person-time summary with multiple predictors - Integration with Cox model results
Usage:
Analyses → Survival → ClinicoPath Survival → Multivariable Survival Analysis
Enable: "Calculate Person-Time Metrics"
Key Outputs: - Overall person-time summary - Stratified person-time by covariates - Incidence rates adjusted for multiple factors
Getting Started with Person-Time Analysis
Step 1: Prepare Your Data
Your dataset should include: - Time variable: Follow-up duration (numeric) - Event variable: Event indicator (0/1 or factor) - Group variables: For comparisons (optional) - Date variables: For time calculation (optional)
Example data structure:
patient_id | followup_months | event | treatment_group | diagnosis_date | last_contact
PT0001 | 24.5 | 1 | Standard | 2020-01-15 | 2022-01-30
PT0002 | 36.2 | 0 | Experimental | 2020-02-10 | 2023-02-15
Step 2: Choose the Appropriate Analysis
Time Interval Calculator: If you need to calculate follow-up times from dates - Input: Start and end dates - Output: Time intervals and person-time concepts
Single Arm Survival: For overall cohort analysis - Input: Time, event variables - Output: Overall incidence rates and time-stratified analysis
Survival Analysis: For group comparisons - Input: Time, event, grouping variables - Output: Group-specific rates and comparisons
Multivariable Survival: For adjusted analysis - Input: Time, event, multiple covariates - Output: Adjusted rates and Cox model integration
Step 3: Configure Person-Time Options
- Enable person-time analysis: Check “Calculate Person-Time Metrics”
- Set time intervals: Specify intervals for stratified analysis (e.g., “12, 36, 60”)
- Choose rate multiplier: Select 100 or 1000 for rate presentation
- Configure time units: Ensure consistent units throughout
Step 4: Interpret Results
Clinical Applications
Example 1: Cancer Survival Study
Scenario: Comparing survival between two treatment groups
Analysis Setup: - Module: Survival Analysis - Variables: treatment_group, survival_months, death_status - Enable: Person-time metrics
Expected Results: - Person-time by treatment group - Group-specific incidence rates - Rate ratios between treatments - Time-stratified analysis
Interpretation:
Standard Treatment: 45 deaths in 2,400 person-months (1.88 per 100 person-months)
New Treatment: 32 deaths in 2,200 person-months (1.45 per 100 person-months)
Rate Ratio: 0.77 (23% reduction in death rate)
Example 2: Epidemiological Cohort Study
Scenario: Disease incidence in exposed vs. unexposed populations
Analysis Setup: - Module: Survival Analysis
- Variables: exposure_status, followup_years, disease_onset - Enable:
Person-time metrics
Expected Results: - Exposure-specific person-time - Incidence rates by exposure - Time trends in incidence - Rate differences and ratios
Interpretation:
Exposed Group: 15 cases in 850 person-years (1.76 per 100 person-years)
Unexposed Group: 8 cases in 920 person-years (0.87 per 100 person-years)
Rate Difference: 0.89 per 100 person-years
Relative Risk: 2.03
Example 3: Drug Safety Monitoring
Scenario: Adverse event rates during drug therapy
Analysis Setup: - Module: Single Arm Survival - Variables: treatment_duration, adverse_event - Enable: Person-time metrics with time stratification
Expected Results: - Overall adverse event rate - Time-stratified rates (early vs. late) - Confidence intervals for safety assessment
Interpretation:
Overall Rate: 12 events in 1,500 person-months (0.80 per 100 person-months)
0-6 months: 8 events in 600 person-months (1.33 per 100 person-months)
6+ months: 4 events in 900 person-months (0.44 per 100 person-months)
Conclusion: Higher event rate in early treatment period
Advanced Features
Time-Stratified Analysis
Person-time analysis can be stratified by time intervals to detect: - Changing hazards over time - Early vs. late event patterns - Treatment effect modifications - Time-dependent risk factors
Setup: Specify intervals in “Time Interval Stratification” option
Example: "6, 12, 24" creates intervals: 0-6, 6-12, 12-24, 24+ months
Rate Multipliers
Choose appropriate multipliers based on event frequency: - Rate per 100 person-time: Common for moderate event rates - Rate per 1000 person-time: Useful for rare events - Rate per 10,000 person-time: For very rare events
Confidence Intervals
Person-time rates use Poisson exact confidence intervals: - Exact method: Based on Poisson distribution of event counts - Conservative approach: Provides accurate coverage - Asymmetric intervals: Reflects the nature of count data
Integration with Survival Analysis
Person-time analysis complements traditional survival methods: - Kaplan-Meier curves: Show survival probability over time - Cox regression: Models hazard rates (instantaneous person-time rates) - Log-rank tests: Compare survival distributions - Person-time rates: Provide absolute risk measures
Quality Assurance
Data Validation
Before person-time analysis:
- Check time variables: Ensure positive, numeric values
- Validate event coding: Confirm 0/1 or appropriate factor levels
- Review missingness: Address missing time or event data
- Assess outliers: Investigate extremely long or short follow-up times
Results Interpretation
When reviewing person-time results:
- Biological plausibility: Do rates make clinical sense?
- Confidence intervals: Are they appropriately wide for the data?
- Time trends: Do time-stratified rates show expected patterns?
- Group differences: Are rate differences clinically meaningful?
Common Issues
Issue 1: Zero Events in Intervals
Problem: Some time intervals have no events Solution: Consider combining intervals or using exact Poisson methods
Reporting Person-Time Results
Methods Section
Person-time analysis was performed to calculate incidence rates accounting
for varying follow-up periods. Total person-time was calculated as the sum
of individual follow-up periods from [entry criteria] to [endpoint definition].
Incidence rates were calculated as the number of events divided by person-time
at risk, expressed per [time unit]. Confidence intervals were calculated using
Poisson exact methods. Time-stratified analysis was performed using intervals
of [specify intervals] to assess for time-varying hazards.
Results Section
A total of [N] participants contributed [total person-time] [time units] of
follow-up (median [median], range [range]). [Number] events occurred during
the observation period, yielding an overall incidence rate of [rate] per
[multiplier] [time units] (95% CI: [CI]). Incidence rates differed significantly
between [groups]: [group 1] [rate 1] vs. [group 2] [rate 2] per [multiplier]
[time units] (rate ratio [RR], 95% CI: [CI], p=[p-value]).
Conclusion
Person-time analysis is essential for proper epidemiological and survival analysis. The jsurvival module provides comprehensive person-time functionality that:
- Educates users about person-time concepts
-
Calculates accurate rates with appropriate
confidence intervals
- Enables group comparisons with rate ratios and differences
- Supports time-stratified analysis for detecting temporal patterns
- Integrates with survival methods for comprehensive analysis
By incorporating person-time analysis into your survival studies, you can: - Provide more accurate and interpretable results - Enable valid comparisons across studies and populations - Better understand temporal patterns in your data - Meet epidemiological standards for rate-based analysis
Further Resources
- ClinicoPath Documentation: Complete module reference
- Epidemiological Methods: Texts on person-time analysis
- Survival Analysis: Integration with traditional survival methods
- Statistical Software: Comparison with other implementations
For questions about person-time analysis in ClinicoPath, please refer to the module documentation or contact the development team.