Sumários

Class 10 (Module II)

20 Abril 2022, 15:00 Jorge Filipe Campinos Landerset Cadima

[Slides 14-79 (except 55-57 and 64)] The exponential family of distributions: definition; discussion of the Noraml, Poisson, Bernoulli and 'Binomial/n' distributions as special cases of the family, with identification of their parameters. Link functions: the identity link and canonical links for each type of distribution. Logistic Regressions: definition, link function, deduction of the expression for the probability of succes, p; comments about Logistic Regressions. The Hosmer & Lemeshow example and fitting GLMs in R. Estimating the parameters in a GLM: the Maximum Likelihood Method and its difficulties. A quick word about Newton-Raphsin methods and numerical algorithms for parameter estimation. Probit Regression: definition, historical origins and its use in toxicology, properties. A Probit Regression in R with the Hosmer & Lemeshow dataset. The complementary log-log model: definition, properties. An example in R, with the Hosmer & Lemeshow data.
Nota: Esta aula foi leccionada na segunda-feira, dia 2.5.22, das 9h45 às 12h20, na Sala S1, simultaneamente presencial e por zoom.


Class 9 (Module II)

11 Abril 2022, 09:30 Jorge Filipe Campinos Landerset Cadima

Linear Models [slides 298-321, 324-325, 327-332, 339-360] Again the two-way ANOVA model without interaction effects: interpreting the parameters with constraints alpha_1=beta_1=0; the lack of flexibility of the model, due to lack of parameters; some formulas. The two-way ANOVA with interaction effects: the model equation and its constraints; the need for three tests, one for each kind of effects; building the three F statistics, through the decomposition of the Total Sum of Squares; the rules to define degrees of freedom for model effects and for residual variability; the summary-table. Fitting two-way ANOVAs with interaction effects in R: two examples (with and without significant  interaction effects).Some formulas and some warnings. The Analysis of Covariance: introducing the concept through the problem of comparing simple linear regressions in k contexts, defined by a k-level factor. The full ANCOVA model, allowing for different regressions lines in each context. Simpler models (a single line for all contexts, parallel lines etc.) as submodels of the ANCOVA model, and the possibility of using partial F tests or Student's t-tests to study them. The relations between the full ANCOVA model and the simple linear regressions using the subset of data in each context. Interpreting the R^2 in an ANCOVA. Fitting ANCOVAs in R: examples and warnings. Generalised Linear Models [slides 1-13] Program and Bibliography. Introducing the concept throught the two extensions to Linear Models. Examples of distributions in the exponential family of distributions. The three components of a GLM in the classic formulation by McCullaugh & Nelder.
Nota: Esta aula foi leccionada na quarta-feira, dia 27.4.22, das 15h às 17h35, na Sala S3, simultaneamente presencial e por zoom.


Class 8 (Module II)

6 Abril 2022, 15:00 Jorge Filipe Campinos Landerset Cadima

[Slides 243-297] One-way ANOVA: the model with the assumptions that make it a Linear Model. The F test for factor effects as a goodness-of-fit test of the Linear Model: adaptations of the terminology and notation; fitted values as the level means; the formulas for Factor and Residual Sums of Squares and Mean Squares; the Linear Model decomposition and the origin of the name 'Analysis of Variance'; the summary table. One-way ANOVAs in R and an example with the iris data. Some additional comments on one-way ANOVAs. A brief discussion of issues in experimental designs: randomization, independent repetitions and pseudo-repetitions, controlling the heterogeneity of experimental units through the introduction of additional factors (blocks) to control variability. Two-way factorial designs: the concept and some issues of notation and terminology. A first model for two-way ANOVAs, without interaction effects: the model, the need for two tests, the two F tests, some formulas (for balanced designs) and the summary table. A discussion of the two alternative approaches (exchanging factors A and B) and their difference when the design is not balanced. Fitting the two-way ANOVA model without interaction with R and a classic example.
Nota: Esta aula foi leccionada na quarta-feira, dia 20.4.22, das 15h às 17h45, na Sala S3, simultaneamente presencial e por zoom.


Class 7 (Module II)

4 Abril 2022, 09:30 Jorge Filipe Campinos Landerset Cadima

[Slides 201-222 + 227-242] Model validation. The distribution of the residuals, given the Linear Model. Standardized residuals. Residual plots and how to read them. Outliers. Other diagnostics: leverage and Cook distance. The adjusted R^2. Plots uding R and examples. Final warnings on linear regression. ANOVA: introduction and motivating examples. One-way ANOVA: terminology and notation; a model equation . The role of indicator (dummy) variables in viewing the one-way ANOVA model as a special case of the Linear Model. The model equation using vector/matrix notation. The problem of over-parametrisation and three possible solutions; the choice of restriction alfa_1=0 and its implications. The Null Hypothesis of the test for the existence of factor effects.
Warning: slides 189-200 and 223-226 were not lectured. The questions in exercise 19 e)f) correspond to these slides, and should therefore be ignored. All other exercises in the Linear Regression can now be solved.
Nota: Esta aula foi leccionada na segunda-feira, dia 11.4.22, das 9h45 às 12h25, na Sala S1, simultaneamente presencial e por zoom.


Class 6 (Module II)

30 Março 2022, 15:00 Jorge Filipe Campinos Landerset Cadima

[Slides 154-188] Inference for any linear combination of the model parameters: confidence intervals and hypothesis tests for the general result a^t Beta. The specific cases of the sum or difference of two parameters, and of the expected value of Y given the predictor values. Examples of confidence intervals for the expected value of Y, in both simple and multiple linear regressions. Visual interpretation of confidence intervals for E[Y] in simple linear regressions and the confidence bands for the population regression line. Prediction intervals for individual value of Y, given the predictor values. Examples for both simple and multiple linear regressions. Visual interpretation of prediction intervals for E[Y] in simple linear regressions and the prediction bands for individual observations. The goodness-of-fit F test: the general result; alternative (equivalent) expressions for the hypotheses and for the test statistic. The justification for right-tailed rejection regions. Examples of the goodness-of-fit test with R. The principle of parsimony and the partial F test to compare a model and one of its submodels: the general result; alternative (equivalent) expressions for the hypotheses and the test statistic; justification of the right-tailed rejection region. An example. Relations between the partial F test and the goodness-of-fit F test. Relation between a partial F test with a submodel that has a single predictor less than the full model and the Student's t-test for the significance of the beta_j for that single predictor in the full model.
Nota: Esta aula foi leccionada na quarta-feira, dia 6.4.22, das 15h às 17h35, na Sala S3, simultaneamente presencial e por zoom.