Module 11. Assignment:



Question A:




 

Question B:

 

B1: Your assignment is to generate the model matrices for the following models: 1. z ~ a*b  #Model with interaction (a*b). 2. z ~ a:b  #Model with only interaction term (a:b)).

Shown in attached screenshots. 

B2: Please also discuss the implications of using these two models; please be reminded about the model fits and notice which models contain singularities. 

After running the two models, we have gained some valuable knowledge. The model "z ~ a*b" includes the main effects of a and b. Including their interaction as they complete the model. In contrast, the model "z ~ a:b" only includes the interaction term. As we analyze and gather data from the output, the second model has a result that portrays singularity, where one coefficient is not defined. The reason for this occurrence is due to the design matrix has columns that are linearly dependent. As a result, we can not estimate all the parameters.

Therefore, the first model is preferred, as it avoids singularities and presents a more complete and stable representation of the information. 

Comments

Popular posts from this blog