Interaction Between Health and Information: 973854

 a)  Age and gender were very significant due to high deviance difference i.e. 281.7923 and 26.2767 respectively.

b. The model never provided adequate fit since the deviance was very small i.e. 7.974. Moreover, the p value was very high (p-value=0.89)

c. Using age as a continuous will reduce the deviance separation thus might raise the residual deviance to make the model fit and to make age significant.

d. The difference in deviance between the two models is 4.697. Using age as continuous variable have increased making the fit to be slightly adequate and making gender and age to have significant effect i.e. t values of -21.89 and 14.74 which are higher as compared to tabulated value.

Question 2

a. R code

Count<-c(76,160,6,25,114,181,11,48)

G<-factor(c(rep(“male”,4),rep(“female”,4))

IO<-factor(c(rep(“support”,4), rep(“oppose”,4)

HO<-factor(c(rep(“support”,4),rep(“oppose”,4))

opinion<-data.frame(count,G,IO,HO)

opinion

A unit change in gender decreases the mean of those supporting by 0.282. A unit change in information opinion increases the mean of those supporting the programs by 1.775 and finally a unit change in health opinion decreases the mean of those supporting the programs by 0.693.

The model is adequately fit since p value is less (0.0026).

b. The full model with all the main effects is not adequately fit due to high p value (0.134). Similarly the model with interaction between gender and information opinion is slightly insignificant (P value=0.0737) and finally the model with interaction is highly insignificant (p value=0.149).

The number of individual = 4 individuals, from 3.728425-0.2820483(2) + 0 1.541423(1) -1.457246(1)

c. A unit change in information opinion increases the mean number of individuals by 1.541423 individuals i.e. 2 individuals. A unit change in health opinion decreases the mean number of individuals by 1. A unit change in Interaction between health and information increases the number of individuals by 1.

Question 3

  1. The sample covariance matrix and sample correlation matrix are given below:

Average rainfall in November and December had negative covariance, average July temperature and radiation in July. Meaning increase in rainfall in November and December decreases temperature in July, radiation in July and vice vasa.

  • i. 65% of variation is explained by the first principle component, 25% by second component, 7.5% by third principle component and 2.5% by fourth component.

ii. The first principal component have a positive correlation with the first and second variable while negative correlation with third and fourth variable. The second component had positive correlation with second and third variables while negative with first and fourth component.

iii. Sample correlation ranges between -1 and 1 while sample covariance picks all real numbers.

ASSIGNMENT TWO

1 a.

  • For stationarity we check whether the roots of  lie outside a unit circle. The roots obtained are greater than 1 thus the process is stationary since the roots lie outside a unit circle.

Question 2

  1. Concentration time series is not stationary.

Second concentration time series differencing does not require further differencing since the acf shows that most lags are between the significant bound (the blue boundary).

b) The model that have been applied to the data is Autoregressive model given by:

Xt =α1Xt ‑1 +α2Xt ‑2 +α3Xt ‑3 +… +αpXt ‑p +et

p

=∑αjXt ‑j +et

j =1

c) Standard residuals-if the lags above and below are almost equal thus showing the model is fit.

acf-the acf of residuals is used to access if the model is fit by observing the lags. The model is fit if most lags are between the significant bound(blue boundary).

Ljung-Box statistics -large p value shows the model is fit and small p value the vice versa.

Conc1.m is the best model.

This is because the acf of the residual of the conc1 has most lags between the the significant bound. The p-value of the model is also large this is evident in the graph.

d) The expected pollution in October 2017 is given as: 348.6909±1.09693×2.567 which gives lower limit as 345.87 and upper limit as 351.5. Therefore, it might slightly go above 350 which might also be the case in 2018.