MerQuR+Statistics Glossary

Statistics Glossary → Survey-PHREG (Weighted Cox)

Survey-PHREG (Weighted Cox)analysis

A method for survival data collected with a weighted, stratified and clustered sampling design (e.g. a national health survey) that estimates Cox regression so as to represent the whole population and computes standard errors according to the sampling design.

Concept

In national surveys participants are not chosen by simple random sampling: the country is first divided into regions (strata), a few neighbourhoods or villages (primary sampling units, PSUs) are chosen in each, and households are then chosen within these units. Some groups are deliberately oversampled. Each participant therefore represents a different number of people in the population, and people in the same neighbourhood resemble each other. An ordinary Cox regression that ignores this design produces estimates that do not represent the population and wrong standard errors.

The design-based Cox model takes three components into account. Weights (the inverse of the selection probability) enter the partial likelihood, so the hazard ratios estimate those of the population rather than the sample (pseudo-maximum likelihood). Clusters and strata enter the variance calculation: the variance is computed from the spread of cluster contributions within strata by Taylor linearisation, or by replication methods such as the jackknife, BRR or bootstrap. The degrees of freedom depend not on the number of observations but on the numbers of clusters and strata (roughly the number of PSUs minus the number of strata).

The hazard ratio is read as in ordinary Cox, but means 'in the population'. Because the weighted likelihood is not a true likelihood, the log-likelihood and AIC should not be used to compare models; the tests are of Wald type. The design effect (DEFF) shows how much the design inflates or reduces the variance relative to simple random sampling. The proportional hazards and non-informative censoring assumptions still apply.

When to use it

  • When survival data come from a probability sample with sampling weights, strata and clusters and the results must generalise to the population (national health and nutrition surveys, household cohorts).
  • If only a subgroup (e.g. women or a certain age group) is to be studied, use the domain option instead of cutting the data; otherwise the standard errors are computed wrongly.
  • If the data do not come from a designed sample and there are just several observations per person, a cluster-robust (marginal) Cox model is enough; with no weights or design, ordinary Cox regression is used.

An everyday example

In a national health survey, 12,000 adults were selected from 81 provinces with a stratified, clustered sample and followed for 10 years; rural areas were deliberately oversampled. The researcher wants to estimate, at the population level, how smoking affects the time to heart disease. Survey-PHREG weights each participant by the population they represent, reflects the similarity of people chosen from the same village in the standard errors, and gives a result such as 'among adults in Turkey, smokers' hazard of heart disease is 1.8 times that of non-smokers'.

Parameters in MerQur

Weight

Concept: The sampling weight shows how many people in the population a participant represents and is the inverse of the selection probability. When the weights enter the estimation, the hazard ratios reflect the make-up of the population rather than of the sample.

Everyday example: If rural areas were oversampled, a village participant may represent 500 people and a city participant 2,000. Without weights, the results apply to a 'country' in which rural areas have a larger share than they really do.

What it does: Sampling weight (inverse of the selection probability). The partial likelihood and score residuals are weighted (pseudo-maximum likelihood, Binder 1992); the point estimate targets the population-level Cox parameter.

Effect on the result: Changes the coefficient and the SE; weight ratios matter, the scale does not.

On the validation data: LibrarySurvey Age coefficient is 0.0825012 in the weighted estimate and 0.0817383 without the weight; SE 0.00968136 and 0.00983326.

→ Sampling weight (design weight)

Cluster / PSU

Concept: The primary sampling unit (PSU) is the cluster chosen at the first stage of sampling (neighbourhood, village, school). Because people in the same cluster resemble each other, they carry less information than their number suggests; the variance is computed from the spread of cluster totals.

Everyday example: Thirty people chosen from the same village share eating habits and health services; they do not carry as much information as 30 independent people. When the PSU is given, the standard error of the smoking effect accounts for this similarity and usually grows.

What it does: Primary sampling unit. Score residuals of observations in the same PSU are summed; the variance is computed from the dispersion of PSU totals (with-replacement Taylor sandwich).

Effect on the result: Only SE, t, p, CI and degrees of freedom (number of PSUs - number of strata); the coefficient does not change.

On the validation data: LibrarySurvey: Age SE 0.00968136 without PSU and 0.00995485 with PSU; t 8.52165 and 8.28754; df 90 and 36.

→ Primary sampling unit (PSU) and cluster sampling

Design stratum

Concept: Design strata are subpopulations within which PSUs are selected separately (region, province). Stratification often reduces the standard errors, because it removes the differences between strata from the variance.

Everyday example: If villages and neighbourhoods were chosen separately in each province, province is a design stratum. The variance is computed from the spread within each province; the natural differences between provinces are not added to the uncertainty.

What it does: PSUs are selected within strata; PSU totals are centred within each stratum (Σ_h n_h/(n_h-1) Σ (U_hj - Ū_h)²).

Effect on the result: SE (usually decreases) and df (PSU - strata); the coefficient does not change. It must not be confused with the baseline-hazard stratum.

On the validation data: LibrarySurvey weighted run: Age SE 0.00968136 without strata and 0.00952815 with strata.

→ Stratified sampling (design stratum)

Baseline-hazard stratum

Concept: The baseline-hazard stratum concerns the model, not the sampling design: each stratum gets its own baseline hazard while the covariate effects are assumed common. It is used to handle a variable that violates the proportional hazards assumption.

Everyday example: If heart disease risk rises with age differently in women and men, sex is made a baseline-hazard stratum. The hazard ratio for smoking is estimated jointly for both sexes.

What it does: A separate (free) baseline hazard for each stratum, with common regression coefficients (stratified Cox).

Effect on the result: Changes the coefficient and the SE (risk sets are formed within strata); the effect of the stratum variable itself is not estimated.

On the validation data: Blind, Type stratum: Treat_Others coefficient 0.425026 unstratified and 0.783132 stratified; SE 0.185475 and 0.149501.

→ Stratified analysis (stratum variable)

Finite population correction (FPC)

Concept: The finite population correction reduces the variance when sampling without replacement covers a large share of the population: if every unit were selected, no sampling uncertainty would remain. With a small sampling fraction its effect is negligible.

Everyday example: If 30 of the 40 villages in a small province were chosen, most of the population has been observed and the uncertainty shrinks. If 30 of 2,000 villages were chosen in a large province, the correction changes almost nothing.

What it does: In sampling without replacement the stratum contribution is multiplied by (1 - f_h). A value ≤ 1 is the sampling fraction f_h; a value > 1 is the number of population PSUs in the stratum, N_h (f_h = n_h/N_h).

Effect on the result: Only the SE decreases; the coefficient and df do not change. The two forms give the same result.

On the validation data: LibrarySurvey: Age SE 0.00968136 without FPC and 0.00963763 with FPC (the N_h and f_h inputs give the same result).

→ Finite population correction (FPC)

Domain (subpopulation) variable and Domain value

Concept: Domain analysis fits the model for a particular subgroup only, but keeps the whole sampling design in the variance calculation. Cutting the data to the subgroup computes the standard errors wrongly, because some clusters and strata disappear.

Everyday example: To study the smoking effect only among women, 'sex = female' is defined as the domain. Men do not enter the estimation, but the design information (which villages, which provinces) stays in the variance calculation.

What it does: The model is fitted only with observations inside the domain, but the whole design remains in the variance estimation (the score contribution outside the domain is zero). If the value is left empty, an explicit error is raised.

Effect on the result: The coefficient comes from the subsample; the SE and df from the whole design. This differs from filtering the data (Lumley 2010, section 2.3).

On the validation data: Validation data sas_mortality (reference last level), POVARIND_k1: whole population coefficient 0.384961, SE 0.0775857 (n = 1668); GENDER = 1 domain 0.424922, SE 0.156583 (n = 813).

→ Domain (subpopulation) estimation

Ties method (Efron / Breslow)

Concept: Sets how the partial likelihood is computed when several events occur at the same time (ties). The Efron approximation is usually more accurate; if event times are measured coarsely and there are many ties, the two methods can give noticeably different results.

Everyday example: If event time is recorded only as age in whole years, many people appear to develop heart disease at the same age. With so many ties, Efron gives a more reliable hazard ratio than Breslow.

What it does: Partial likelihood approximation for tied event times.

Effect on the result: Coefficient and SE; the difference grows as the number of ties increases.

On the validation data: LibrarySurvey Age coefficient is 0.0825012 with Efron and 0.0615929 with Breslow (SE 0.00968136 and 0.0083655).

→ Ties method (Efron, Breslow, exact)

Categorical reference (first level / last level)

Concept: For a categorical variable coded as text, sets whether the base level is the alphabetically first or last level. Changing the base level flips the sign of the coefficient and the group compared, not the model itself.

Everyday example: If smoking status is coded as text, using the first or the last level as reference changes which group is compared with which; the two hazard ratios are reciprocals of each other (e.g. 1.8 and 0.56).

What it does: Reference level for text categorical variables (by alphabetical order).

Effect on the result: Dummy parameterisation; the model and fit are the same, the coefficients are re-expressed relative to the baseline level.

On the validation data: Blind: Treat_Others 0.425026 with the first level as baseline, Treat_Laser -0.425026 with the last level as baseline (SE 0.185475).

→ Reference category (comparison level)

Variance method (Taylor linearisation / Jackknife (JK1 / JKn) / BRR (balanced half-samples) / Fay BRR / Bootstrap (Rao-Wu) / Supplied replicate weights)

Concept: Sets how the design-based variance is computed. Taylor linearisation computes the variance with a direct formula from the cluster contributions; the jackknife drops one PSU at a time, re-estimates the model and looks at how much the estimates move.

Everyday example: In the jackknife, each of 160 villages and neighbourhoods is dropped in turn and the smoking effect recomputed 160 times; if the effect moves a lot from village to village, the standard error is large. The Taylor method gives the same information approximately in a single calculation.

What it does: Taylor linearisation or design-derived jackknife (each PSU is deleted in turn; PSUs in the same stratum are weighted by n_h/(n_h-1)).

Effect on the result: Only SE, t, p and CI.

On the validation data: LibrarySurvey Age SE: Taylor + Breslow 0.0083655, JKn 0.00915617 (t 7.36273 and 6.72693); Efron: Taylor 0.00995485, JKn 0.0105558.

→ Taylor linearization and replication variance methods

Jackknife deviation centre (Replicate mean (R default) / Full-sample estimate (SAS, mse))

Concept: Sets what the deviations in the jackknife variance are measured from: the mean of the replicate estimates or the full-sample estimate. The two options usually give almost identical results; the difference matters only when matching other programs exactly.

Everyday example: The jackknife standard error of the smoking coefficient may be 0.09156 with one centre and 0.09159 with the other. This difference is irrelevant for interpretation; the setting is matched only when comparing with other software to the decimal.

What it does: Centre of the deviations in the jackknife variance: the replicate mean or the full-sample estimate (MSE form). Active only when jackknife is selected.

Effect on the result: Only the jackknife SE (and t, p, CI); the full-sample centre is always greater than or equal to the mean-centred variance.

On the validation data: LibrarySurvey, Age, Breslow: mean-centred SE 0.00915617, full-sample 0.00915868 (0.009159 to four significant digits).

→ Jackknife

Variance method: BRR (balanced half-samples), Fay BRR, Bootstrap (Rao-Wu), Supplied replicate weights

Concept: Replication methods build many 'resamples' by altering the weights according to set rules and re-estimate the model in each; the spread of the estimates gives the variance. BRR picks one of two PSUs from each stratum, Fay's method does this with gentler weights, the bootstrap draws PSUs with replacement, and some national surveys are released with ready-made replicate weights.

Everyday example: If the survey agency did not share village IDs, to protect confidentiality, but added 80 replicate-weight columns to the data set, 'supplied replicate weights' is chosen. The smoking effect is recomputed 80 times and the standard error comes from the spread of these 80 values.

What it does: Estimates the variance with replicate weights; in each replicate the weights are changed to w x multiplier and the Cox model is re-estimated. BRR requires exactly 2 PSUs per stratum (Hadamard matrix, scale 1/K, K the number of replicates); Fay multipliers are 2 - rho and rho; bootstrap (Rao-Wu) draws n_h - 1 PSUs per stratum, scale 1/(K - 1); the supplied option uses replicate columns in the dataset.

Effect on the result: Only SE, t, p and CI change; the coefficients are the same. The degrees of freedom are rank(replicate weights) - 1.

On the validation data: In simulated data (7 strata x 2 PSUs) the SE of x is 0.0953459251565 with BRR, 0.0875397143335 with Fay (rho = 0.3) and 0.0822418608093 with Taylor. mortality BRR SE 0.1013; the BRR SE depends on the Hadamard matrix used.

→ Taylor linearization and replication variance methods

Fay coefficient (rho), Bootstrap replicates, Replicate weight columns, Replicate type (JK1 / JKn / BRR / Fay / bootstrap / other), Scale, Replicate scales (rscales)

Concept: These are the details of the replication methods: the Fay coefficient sets how gently the weights are altered, the number of bootstrap replicates how many resamples are drawn, and the scale the factor that turns the replicate deviations into a variance. For supplied weights this information comes from the documentation of the agency that released the data.

Everyday example: If the survey documentation says 'Fay's method, rho = 0.5, 80 replicates', these values are entered as given. A wrong scale makes the standard error systematically too large or too small; the coefficient itself does not change.

What it does: Helper fields activated by the method: Fay rho (default 0.5), number of bootstrap replicates (default 500), supplied replicate columns, replicate type (sets the default scale, K the number of replicates: JK1 (K - 1)/K, BRR 1/K, bootstrap 1/(K - 1), other 1), scale (empty means the type default, a fraction can be entered) and rscales.

Effect on the result: Changes only the scale and multipliers of the replicate variance, hence SE, t, p and CI. These fields are not used when Taylor or jackknife is selected.

On the validation data: For Fay rho = 0.3 the SE (x) is 0.0875397143335 and for BRR 0.0953459251565. For bootstrap K = 50 the scale is 1/49.

→ Taylor linearization and replication variance methods

Additional output: Design effect (DEFF), Save residuals

Concept: The design effect (DEFF) is the ratio of a coefficient's design-based variance to the variance computed by assuming simple random sampling with the same weights. DEFF > 1 shows that clustering reduces the information; DEFF < 1 that stratification increases precision. Residuals can be saved to the data set to examine model fit and influential observations.

Everyday example: If the smoking coefficient's DEFF is 1.5, the clustered design means the 12,000-person sample carries about as much information as a simple random sample of 8,000. A DEFF of 0.7 means stratification makes the sample more efficient than expected.

What it does: DEFF is the ratio of the coefficient variance to the simple random sampling (with replacement) variance with the same weights, and adds a column to the coefficient table. The save option adds martingale, deviance and (weighted) dfbeta residuals to the dataset.

Effect on the result: Does not change the result tables; only an extra column and a summary row.

On the validation data: Validation data sas_mortality, POVARIND_k1 DEFF = 0.64589 (whole population) and 0.79563 (GENDER = 2 domain).

→ Design effect (DEFF)

Confidence Level (%90 / %95 / %99 / Other (custom), 80 to 99.9)

Concept: Sets the level of the confidence interval for the hazard ratios. The interval is built from a t distribution based not on the number of observations but on the design degrees of freedom (roughly the number of PSUs minus the number of strata).

Everyday example: Even with 12,000 people, a design of 160 villages and neighbourhoods selected in 81 provinces has about 160 - 81 = 79 degrees of freedom. The 95% confidence interval for the smoking hazard ratio is therefore somewhat wider than the number of people would suggest.

What it does: Level of the HR confidence interval (t(df) quantile).

Effect on the result: Only the lower and upper HR limits.

On the validation data: In the %90, %99, %97.5 and %80 runs only the interval limits change.

→ Confidence level and confidence interval

Example on real data

Data: Interpretation: course data mortality22x2_rep (SAS SURVEYPHREG Example 3 mortality, 22 strata x 2 PSUs + BRR weights; n = 1458, 630 deaths, 44 PSUs, df 22). The mortality values in the parameter examples come from the validation data sas_mortality (1891 rows, 1668 after removing missing values, 55 PSUs, df 33); the other examples come from the LibrarySurvey and Blind data.

Variables: time AGE, event DEAD, predictor POVARIND_k (poverty), weight SWEIGHT, PSU VARPSU, stratum VARSTRATA

  • Question: In a national mortality survey with a complex sample design (course data mortality22x2_rep; n = 1458, 630 deaths; 22 strata, 44 PSUs), is poverty status (POVARIND) associated with the hazard of death by age?
  • Design: Population-level estimation with the sampling weight SWEIGHT; Taylor linearisation (sandwich) variance based on PSU and stratum; degrees of freedom PSU - strata = 22.
  • Result: The coefficient of POVARIND level k2 (reference first level k1) is -0.3835 (SE 0.0877, t(22) = -4.37, p = 0.00024); HR = 0.6815, 95% CI [0.568, 0.817]. The hazard of death in group k2 is about 32% lower than in k1.
  • Overall test: Wald F(1, 22) = 19.12, p = 0.00024 (with one parameter t² = F).
  • Limitation: Because of the weighted (pseudo) likelihood, the log-likelihood and AIC are large on the scale of the weights and should not be used for model comparison; an ordinary Cox model that ignores the design gives a different SE (0.1306).
  • APA: In design-based Cox regression, POVARIND significantly predicted the hazard of death, b = -0.38, SE = 0.09, t(22) = -4.37, p < .001, HR = 0.68, 95% CI [0.57, 0.82].

Related concepts

Ties method (Efron, Breslow, exact)JackknifeTaylor linearization and replication variance methodsPrimary sampling unit (PSU) and cluster samplingStratified analysis (stratum variable)Finite population correction (FPC)Domain (subpopulation) estimationDesign effect (DEFF)

The numbers in the examples are MerQur's output on independent, publicly available validation data; see the MerQur Technical Note for details.