Use the normal linear model , with fixed full-column-rank design matrix , independent errors , and . Its log-likelihood is
For fixed , differentiating with respect to gives . Since is positive-definite, the unique least-squares estimate is
Let . The variance score equation is , giving
This is the maximum-likelihood estimator, whereas the residual standard error reported by linear-regression software is . The latter uses the unbiased residual estimate of Gaussian noise variance. These formulas assume and positive RSS; exact interpolation gives a variance-boundary degeneracy rather than an interior maximum.
The regression residual vector is , where is the hat matrix. Both and are symmetric idempotent matrices, and . Therefore and the linear image of a multivariate normal vector gives
This multivariate normal distribution is singular, with rank : fitted-residual orthogonality forces . Specifically, and for distinct observations. Thus regression residuals are generally neither independent nor identically distributed, even though the model errors are. Also and is independent of , which justifies the standard errors and exact Student t-tests below.
In an R formula, I(...) protects ordinary arithmetic from the formula operators: the predictor is the numerical variable , rather than an instruction to remove a formula term. Predictor centering leaves fitted values and the height slope unchanged but places the intercept at a meaningful height. It often reduces the correlation between intercept and slope estimates.
With , treatment contrasts use female as the reference level in a regression factor. The fitted normal linear model is
The estimates and their standard errors are
The intercept estimates female mean weight at height 165. At that same height the male fitted mean is . Holding height fixed, the fitted male mean exceeds the female mean by 4.3294 weight units. Within either sex, one additional height unit increases fitted mean weight by 0.6211 weight units. If height is in centimetres and weight in kilograms, these interpretations use centimetres and kilograms accordingly. A standard error for the male intercept would require the covariance between and , which is not printed.
The prediction equation is . Predictions for individual students also have residual uncertainty, estimated by , beyond uncertainty in the fitted mean.
The additive model gives useful evidence for both predictors. To test for no adjusted sex effect, use against . The statistic has a Student t-distribution with 97 statistical degrees of freedom under the normal linear model and the null hypothesis. Here and . Similarly, against a nonzero common slope gives under the null hypothesis, with . Thus, at a fixed height males have a higher fitted mean weight, and within sex greater height is associated with greater weight.
The interaction model adds . Its female height slope is and its male height slope is . Test against using under the null hypothesis, or equivalently . The -value is 0.73139. The additive model is a reasonable parsimonious choice; the data give no evidence for different height slopes between sexes. This does not establish exact equality of population slopes. The additive model also has the higher adjusted coefficient of determination, 0.405 versus 0.3996, and a slightly smaller residual standard error.
Ignoring sex gives a height slope of 0.8769, appreciably above the adjusted slope 0.6211. This is omitted-variable bias in the descriptive regression: a taller group with a larger intercept makes the pooled height association steeper. Algebraically, with ,
The printed estimates imply a positive height-sex covariance. Pooled and adjusted slopes therefore describe different comparisons; the difference is not evidence that adding sex changed a physical effect of height. For predictions, retain both sex and height, check regression diagnostics, and assess performance on new students. The residual standard error near 5.7 remains substantial and the coefficient of determination near 0.42 does not promise precise individual prediction.
The largest positive regression residual divided by the residual standard error is about , , and in the three models. In comparison, the most negative regression residual is only about two residual standard errors below zero. At least one observation is much heavier than its fitted value, even after adjusting for sex and height.
A standardized regression residual is , so the regression leverage adjustment can make these ratios larger. The maximum is selected among 100 correlated regression residuals, however; it is not a prespecified single standard-normal observation. These summaries do not give a formal regression outlier test or identify which student is extreme. Ask to check the measurement and data entry, examine residual plots and a normal quantile-quantile plot, and inspect regression leverage and influential observations. A valid observation might reveal a heavier-tailed error distribution, an omitted predictor, or a nonlinear relation. Do not remove it solely because it is unusual, and do not infer from the three summaries alone that all three maxima belong to the same student.
A regression factor is a categorical predictor represented by level indicators and contrasts. Treating year as a regression factor permits arbitrary differences between the three yearly means, reflecting conditions such as weather, rather than imposing a linear time trend.
Let be the yield for seed variety , fertiliser level , and year . A treatment-coded two-factor normal linear model with additive year effects is
with independent errors. The unrestricted coefficients are : six parameters for twelve observations. Equivalently use baseline-zero variety, fertiliser, and interaction arrays. There are no year-treatment interactions in this fit.
Dividing each sum of squares by its statistical degrees of freedom gives the completed analysis of variance:
In particular, the missing interaction statistic is . Its null hypothesis is , against : the change in mean yield from high fertiliser is the same for both varieties. Under the null hypothesis and the independent homoscedastic normal linear model, this nested-model F-test has distribution . The printed -value 0.001137 strongly rejects no interaction.
Do not drop fertiliser just because its main-effect ANOVA row has . In this balanced factorial design that row measures a fertiliser effect averaged over varieties; large opposite effects can cancel. The strongly supported interaction requires retaining its associated main effects by regression model hierarchy. Seed and year also have evidence of effects in their ANOVA rows, so this table alone gives no compelling simplification of the fitted terms.
The interaction contrast is , with standard error 0.7946. The fitted high-minus-low fertiliser effect is for variety 1 but for variety 2. The fitted variety-2-minus-variety-1 contrast is under low fertiliser and under high fertiliser. Thus variety 2 performs best under low fertiliser, while high fertiliser benefits variety 1 and reduces variety 2's fitted yield. The marginal fertiliser effect is only .
The four fitted means in the baseline year are for respectively. Add in 2005 and in 2006 to every fitted mean. The 2005 coefficient has under a test of a zero contrast with 2004; the analogous 2006 contrast has . The latter is lack of evidence for a difference, not proof that the yearly means coincide. Standard errors for the combined contrasts require the coefficient covariance matrix. The experiment is small: residual standard error is 0.6882 on only six statistical degrees of freedom. If the same fields were reused, possible within-field dependence and field allocation would need checking before treating the fitted error independence as established.
Index independent experimental vials by , write for the observed total eaten and for the number of other-species eggs eaten. The grouped-binomial logistic regression uses
Here and identify day and adult species, and the free effects are . There is no day-species interaction. The weights in the binomial generalized linear model are the denominators , so fitting the proportions gives this binomial likelihood, not 23 Bernoulli observations. The dispersion is fixed at one. This is a model for the composition of eggs eaten conditional on the total, rather than a model for the total appetite.
There are 23 independent vial responses. The intercept-only fit has 22 residual statistical degrees of freedom and deviance 33.631. Adding two day indicators removes two statistical degrees of freedom and reduces the residual deviance by . Adding the two species indicators then reduces it by . Thus the six replacements, in their printed order, are .
The residual deviance statistical degrees of freedom are , , and . These sequential analysis-of-deviance rows compare nested generalized linear models in the displayed order. In an unbalanced design, the first day row does not test day after controlling for species.
Compare the species-only model against the additive day-and-species model. The null hypothesis is , with the alternative that at least one is nonzero. The likelihood-ratio statistic is the reduction in residual deviance,
Under the null hypothesis, regular binomial likelihood asymptotics give , because the larger model has two additional parameters. For this chi-squared distribution the upper-tail probability is . There is no evidence of a day effect after controlling for species, and the species-only model is a reasonable simpler choice. The sequential day-only statistic 0.273 from the preceding table answers a different question and must not replace this comparison.
In the species-only model, the log odds for adult species A is the intercept, so with standard error 0.07824. This also follows directly by pooling its vials: there are 570 other-species eggs among 799 eggs eaten, giving and
For a regular maximum-likelihood estimator, asymptotic normality of a maximum likelihood estimator gives , with information . Substitution of gives . An approximate 95% Wald confidence interval is
This interval treats the selected species-only model as fixed; it does not account separately for uncertainty from choosing that model.
The relevant no-preference benchmark is , because two of the three equally supplied egg types count as other-species eggs. Its log odds is , which is below the entire confidence interval. Under the fitted binomial model, species A preferentially consumes other-species eggs. The estimate is , and transforming the log-odds confidence interval by gives approximately .
Comparing the interval with zero would test equal numbers of own- and other-species eggs eaten, which is not the no-preference hypothesis for this supply. The conclusion remains model-dependent: eggs are taken from a finite supply without replacement, and depletion or dependence within a vial can affect the binomial approximation. This fitted analysis supports an association with egg type; it does not by itself establish the mechanism of recognition or avoidance.
For the Poisson regression, the log-likelihood is
Since , the score function and its derivative are
Consequently a finite maximum-likelihood estimator satisfies
These nonlinear equations are normally solved by iteratively reweighted least squares. If has full column rank, the Hessian is negative definite and any finite solution is the unique maximizer. Full rank does not by itself rule out a boundary solution at infinite coefficients for every conceivable data set. The Poisson generalized linear model has dispersion one, so there is no separate scale parameter in this likelihood.
The saturated model estimates each Poisson mean separately as , permitting the boundary value zero when . Subtracting fitted from saturated log-likelihood gives the Poisson deviance
with . A zero observation contributes . If the model includes an intercept, the score equation gives , so the summed linear terms cancel; the unsimplified expression applies generally.
For goodness of fit, the null hypothesis is that the specified independent Poisson mean model is correct; the alternative is an unrestricted collection of means. When a quadratic likelihood approximation is valid, for example with fixed and large expected counts, has approximately a chi-squared distribution with statistical degrees of freedom. Reject for a large upper-tail deviance. Merely increasing the number of sparse observations does not make this saturated-model reference reliable: the alternative dimension also increases. With small fitted means, replication-based checks or a parametric bootstrap are more defensible. This qualification concerns the absolute goodness-of-fit deviance; a fixed-dimensional nested likelihood-ratio comparison can have a better chi-squared approximation.
A Poisson model assumes independent counts between rats conditional on time, a common mean at a given time, and conditional variance equal to that mean. Comparable observation units and consistent counting are needed; unexplained rat-to-rat heterogeneity is excluded by this simple specification. The quadratic Poisson regression is
The printed nested analysis of deviance tests against . Its likelihood-ratio statistic is , approximately under the null hypothesis and regular Poisson asymptotics. The reported gives borderline rejection of the log-linear time effect at 5%, conditional on the Poisson assumptions. This is curvature of the log mean, rather than an ordinary quadratic model for the count itself.
There are only three distinct time values, so the intercept, linear term, and quadratic term span every possible set of three log means. This is Poisson mean saturation at three distinct times: the quadratic fit is saturated for the time-group means, which are , , and . A grouped deviance comparison against unrestricted time-group means has zero statistical degrees of freedom: the quadratic functional form cannot be tested at these three times. The individual-observation deviance 24.515 still describes within-group departure from the Poisson distribution, but small means and zeros make the naive goodness-of-fit calibration doubtful. Poisson variation itself can be checked using the replicates, preferably by a parametric bootstrap; it is not rendered untestable by the saturated mean specification.
Overdispersion means conditional variance exceeding the variance assumed by the Poisson mean model. For example, rats may have different latent susceptibility, so if , the law of total variance gives . A quasi-Poisson model instead uses . The Pearson-residual dispersion estimate is , using .
For the conventional quasi-likelihood comparison with estimated dispersion, use
Its upper-tail probability is about 0.096, so the evidence for curvature no longer reaches 5%. The F-distribution is an approximate calibration, not an exact small-sample result for arbitrary overdispersed counts; quasi-likelihood does not supply a full Poisson likelihood. With known dispersion one would instead compare approximately with . The displayed dispersion code uses the undefined name acf.glm2; its fitted values must be those of aom.glm2 for the stated calculation.
Right censoring occurs when a subject's exact failure time is unobserved but it is known that , where is the censoring time. The observed pair is and . For example, a living participant at study closure contributes a survival lower bound rather than a recorded death at closure. Right censoring differs from simply omitting the subject: time spent in the risk set remains informative.
A standard sufficient non-informative censoring assumption is independent censoring: and are independent, or conditionally independent given the covariates used in the analysis. Their distributions need not be equal, have the same shape, or have proportional hazards. In a likelihood analysis the censoring distribution should also carry no information about the survival parameters being estimated, allowing its factor to be omitted. In the more general risk-set formulation, the censoring history must not alter the subsequent failure hazard conditional on the observed history used by the model. Informative censoring can arise if worsening unrecorded health causes withdrawal.
Among subjects alive at any given time and with the same relevant covariates or observed history, those censored at that time have the same subsequent failure distribution as those who remain under observation. Equivalently, the observed risk set represents the failure hazard of comparable subjects still alive, rather than selectively retaining lower- or higher-risk subjects. This is a statement about their future conditional risk, not that the observed failure-time distribution among censored people equals the distribution among people who eventually fail: their different observation patterns make that comparison inappropriate.
Let and . Since , the discrete hazard satisfies . Hence
Starting from and iterating, the survival function is
Under independent censoring, the risk set just before gives the binomial conditional failure likelihood , whose maximizer is . This gives the Kaplan–Meier estimator
Failures at exactly are included because the target is . Censored subjects contribute to earlier risk sets and leave before later ones; they do not create a failure factor. The usual convention includes a subject censored at a tied failure time in the risk set for that failure. Estimation beyond the last observed failure is limited by the available follow-up.
The last lung-cancer failure before five years is at 4.85, where the displayed net survival estimate is 0.392. The other-death net survival estimate remains 0.498 from 4.096 until 5.065. Thus the two supplied curves imply net five-year death estimates of for lung cancer and for other causes. Their sum is 1.110, already showing that they cannot be probabilities of two disjoint actual causes of death.
In competing risks, let and be the cause-specific hazards while alive, with cumulative hazards . Treating the other cause as censored estimates the net survival . The actual probability of death from cause by time is the cumulative incidence function
Since , the net probability generally overstates the cumulative incidence function: death from the other cause prevents a later death of cause . This discrepancy exists even for independent latent cause-specific failure times. Moreover, Kaplan–Meier estimates are not generally exactly unbiased in finite samples even for their proper target. The plotted complements are not unbiased estimators of , and are not even consistent for that target in general.
For the desired probabilities, use the Aalen–Johansen estimator , with all-cause survival and independent study censoring. Removing competing deaths from subsequent risk sets is correct for estimating cause-specific hazards; the error is interpreting the separate net survival complements as cumulative incidence functions. A hypothetical elimination-of-a-cause interpretation of net survival would require additional causal assumptions.
Use the three-state competing risks model shown below. State 0 is alive after surgery, state 1 is dead from lung cancer, and state 2 is dead from other causes. Both death states are absorbing. Study censoring is an observation mechanism, not a biological transition to a fourth state.
For treatment (radiotherapy) or (chemotherapy), define the transition intensity
The fitted Cox proportional-hazards models are
Here and represent the estimated baseline cause-specific hazards for radiotherapy. More formally, the baseline estimates can be expressed as cumulative hazard measures with increments , rather than ordinary smooth functions. All outgoing intensities from states 1 and 2 vanish, and . The treatment hazard ratios are 3.7111 and 1.8045 respectively. This model describes the two observed causes of death, not identifiable latent failure times after death has already occurred.
Among patients still alive at the same time after surgery, chemotherapy has an estimated lung-cancer death rate 3.71 times that of radiotherapy, assuming proportional cause-specific hazards. The estimated 95% confidence interval for this hazard ratio is . Thus the fit suggests a higher instantaneous lung-cancer death rate on chemotherapy, with appreciable uncertainty in its size.
The null hypothesis of no treatment effect on that hazard is against . Its Wald test uses , approximately standard normal under the null hypothesis, with two-sided . This is evidence against equal lung-cancer death hazards in the fitted model. It is not a statement that five-year lung-cancer death probability is multiplied by 3.71 or that survival duration is divided by 3.71. The cumulative incidence function depends on both cause-specific hazards, and the model needs proportional-hazards and independent observation-censoring assumptions. In a randomised comparison the assigned treatment contrast is protected against baseline confounding, but the instantaneous comparison concerns the groups who have survived to the time in question; it does not identify a treatment effect within a common latent survivor subgroup.
The moment-based approach specifies marginal means, variances, and within-student covariances, without supplying a joint probability distribution for each count profile. It is a quasi-likelihood or generalized estimating equation strategy. The parameter interpreted as a structural-zero fraction is not automatically an actual probability of a structural-zero component merely because it appears in the moment formulas. A valid positive-definite working covariance and parameter identifiability must also be checked.
The printed covariance specification is not admissible for all the stated parameter values. For example, take , , and all three component means equal to 10. It gives diagonal variance 80 and off-diagonal covariance 100, so . A covariance matrix cannot have a negative variance in any direction. Thus the moment approach requires additional admissibility restrictions or a valid working covariance; the parameter ranges alone do not define a valid model. This does not alter the hierarchical model, whose covariance derived below is positive semidefinite.
The alternative gives a full hierarchical mixture distribution, specifically a shared zero-inflated Gamma-Poisson count model: a common student random effect is zero with probability , and otherwise has a Gamma distribution with mean 1 and variance . Conditional on this effect, the three counts are independent Poisson random variables. Integrating it out induces both excess zeros and positive within-student dependence. Zero inflation is shared for the whole student, rather than independently reselected in each term. This full distribution supports likelihood-based inference but is more sensitive to the distributional assumptions.
The marginal mean in the hierarchical model has the same form as the proposed moment mean. Its marginal covariance does not, in general, equal the printed working covariance; the law of total covariance calculation below makes the distinction explicit. At the Gamma component is interpreted as its point-mass-at-one limit. At all counts are zero, and the log-mean parameterization and regression effects are not identifiable.
For the moment approach, write and let be a positive-definite working covariance constructed from the proposed moment formulas. For identifiable mean coefficients , let . Generalized estimating equations take the form
Across independent students, correct mean specification and standard regularity conditions give consistent identifiable mean coefficients even if the working covariance is wrong. Sandwich covariance matrix standard errors use
Residual second-moment estimating equations can estimate identifiable dispersion and association parameters. The marginal mean only identifies , not and separately. Moment restrictions beyond the mean would be needed to separate them; as shown below, the printed restrictions do not generally recover the intended latent parameters.
For the hierarchical approach, maximize the observed-data likelihood after integrating out the random effect. Set , , and . The joint likelihood contribution is
The integral comes from multiplying three conditional Poisson mass functions by the Gamma density and integrating over . Independent students give . Direct numerical maximum likelihood or an expectation-maximization algorithm can be used; in an EM algorithm an all-zero profile has an uncertain latent component membership. Information-based likelihood standard errors apply under regular interior conditions, with special care for parameter boundaries.
With , the marginal moment model gives
Thus and are ratios of expected visits in Lent and Easter to expected visits in Michaelmas, respectively, at the same baseline covariates. These are population mean ratios, including students with no propensity to attend; they are not odds ratios or probabilities of any attendance.
In the hierarchical model, for a fixed positive student effect , the conditional mean ratio is also . It describes a multiplicative within-student change in expected visits holding the student effect fixed. For the structural-zero component all three means are zero, so no nonzero ratio is defined there. Since the distribution of and the mixture weight do not vary by term, integrating out preserves this same marginal mean ratio. This is mean-ratio preservation under a multiplicative random effect: the conditional and marginal term coefficients coincide for this multiplicative log-link model. They need not coincide in a general nonlinear mixed model, such as a logistic random-effect model. A log-mean difference is not a difference of expected logarithms of counts, which can be undefined at zero.
Keep baseline covariates fixed and put , , and for . Integration of a Poisson count over the Gamma component gives
This negative binomial distribution has mean and variance . Therefore the unconditional one-term distribution is the zero-inflated negative binomial distribution
In particular its zero probability is , not simply . As this becomes a Zero-inflated Poisson distribution.
The mixing effect has , and . The law of total variance and law of total covariance now give
Equivalently, for , and . This also supplies raw second moments by adding . Dependence arises from both shared heterogeneity and shared structural zeros, even when the positive random effect is constant.
The printed moment variance matches the hierarchical variance at the same parameter values, but its printed off-diagonal covariance is . Equality would require , or . It is therefore false to claim that the two approaches consistently estimate all the same parameters in general.
The precise distinction is between consistency of mean ratios and identification of structural parameters. In the hierarchical model, with , both the quadratic variance coefficient and the covariance coefficient in terms of the marginal mean are
For the moment parameterization, writing its parameters as , these coefficients are and . Its intercept is identifiable from the mean only as . Matching the true first two moments demands . One solution always is
For there is also a solution , , , with the corresponding shifted intercept. Indeed eliminating gives . This is moment aliasing in a shared zero-inflated count model: matching the moments does not identify the actual structural-zero probability.
For a concrete counterexample take . Then and . The only admissible moment-matching choice is , with an intercept shifted by ; it cannot recover the true structural-zero proportion 0.2. Correct marginal means can give consistent term and baseline-covariate slopes with sandwich standard errors; they do not justify consistent estimation of the intended , or latent intercept. Nor does a mean-only estimating equation identify at all. Full-distribution inference provides information beyond these first two moments.
The likelihood-ratio statistic is
The null hypothesis is at the boundary of the permitted mixture weights. Assuming the remaining parameters are identifiable and interior, including , an efficient normalized score for is asymptotically under the null hypothesis. The locally unconstrained quadratic log-likelihood maximizer is proportional to , while the constrained maximizer truncates it at zero. Thus , giving the one-sided boundary likelihood-ratio limit
Here is a point mass at zero. For a positive observed statistic the upper-tail probability is half the ordinary upper tail. The 5% critical value is the 90th percentile of , about 2.7055, displayed as 2.71. Hence the reported likelihoods give a very marginal rejection of at 5%, with .
Using the ordinary 95th-percentile cutoff 3.84 would be inappropriate for this one-sided boundary test. The conclusion is close enough to the threshold that likelihood rounding matters: since each log-likelihood is printed to two decimals, the unrounded statistic can differ from 2.72 by nearly 0.02. The intended calculation rejects using the reported values, but an exact decision from the fitted data requires unrounded likelihoods. If the nuisance dispersion is also on its boundary or the mixture is not identifiable, the stated half-and-half null distribution needs reconsideration.

Articles by others on the same topic (0)

There are currently no matching articles.