Chapter 13 confusion!

Discussion in 'CS1' started by Molly, Feb 23, 2023.

  1. Molly

    Molly Ton up Member

    Hi all,

    Really struggling with chapter 13, in particular the section linear predictors and question 9.
    For part a, im very confused as to where the markscheme got to those models. for example i would have said that model 2 (YO+FS+YO.FS+TC) where \alpha=YO, \beta=FS and \gamma=TC would have been
    \alpha_i +\beta_k +\gamma_j _\sigma_ij
    where \sigma_ij is the interaction term between \alpha and \beta.
    But this isnt the case, the answer is \alpha_ij + \gamma_j. How did they get this model?
    The model 3 equation makes no sense to me either, the course notes say "when an interaction term is used in a model, both main effects must also be included", but the answer for the interaction Y0*FS*TC is simply \alpha_ijk. How is this possible?

    Finally, im very confused how they have got their parameters. Is there a formula for parameters or a rule i am missing?
    I would have said that there is 6 parameters, as we have two options for each YO, FS, TC, but this isnt the case... even in the course notes the treatment of parameters is very unclear, for example on page 653 they combine parameters but there isnt any explanation on why they chose those specific ones to combine

    Please can someone help clear this up?
     
  2. Andrea Goude

    Andrea Goude ActEd Tutor Staff Member

    Hi Molly

    Model 2
    alpha_i + beta_k + gamma_j + sigma_ij would have been an acceptable alternative to alpha_ij + beta_k
    The alpha_ij term is made up of the combination of alpha_i + gamma_j + sigma_ij
    There is a question and answer in Section 3.3, p25 that runs through this with some numbers, which may help.

    Model 3
    The alpha_ijk term is made up of alpha_i + gamma_j + beta_k+ sigma_ij + delta_jk + theta_ik + lambda_ijk
    All the values have been combined into alpha_ijk, this includes all the effects

    Number of parameters
    1 factor alone parameters = number of categories eg YO = 2
    as you add factors + (n-1) where n is the number of categories eg parameters in YO+FS = 2 + (2-1)
    as you add interactions +(n-1)(m-1) where n is the number of categories for first factor and m is the number of categories for second factor eg in YO+FS+YO.FS = 2 + (2-1) + (2-1)(2-1) = 4
    To solve the parameters we have to combine some of the constants, so that is why they are less than you might have expected, again the question and answer in Chapter 13, Section 3.3 on p25 may help you see this in practice.

    Thanks
    Andrea
     
    Last edited: Mar 14, 2023
    Molly likes this.
  3. Molly

    Molly Ton up Member

    Hi Andrea, thank you so so much for this - your answer has really cleared this up for me!
     
  4. Cam Bridger

    Cam Bridger Keen member

    Hi Andrea, this is also confusing me as well.

    Section 3.3, p25 - where is this? Is this another thread on the forums? Or a page in the CMP?

    Thanks!
     
  5. ykai

    ykai Ton up Member

    I guess is CMP,it show possible parameters of question. 3.3-p25 has only one question.
     
    Andrea Goude likes this.
  6. Molly

    Molly Ton up Member

    Hi Andrea, thank you again for this. i feel very happy with the parameters for a factor now :) , im just a little confused on how we would compute n for variables?
    Thanks
     
  7. Andrea Goude

    Andrea Goude ActEd Tutor Staff Member

    Hi Molly
    1 variable alone has 2 parameters, an alpha and beta say.
    As we add a variable we add 1 parameter.
    As we add an interaction term n would be 2 for the variable, so you would multiply by 1, this is the (n-1) in the interaction term, multiplied by (m-1) for the other variable or factor.
    Thanks Andrea
     
    Molly likes this.
  8. Molly

    Molly Ton up Member

    ah, thank you so much, i understand what you mean!
     
  9. Tinashe Chikwamba

    Tinashe Chikwamba Made first post

    Thank you Molly for the question, I have finally understood this thanks to you. I am still facing challenges however on how they went on to calculate the degrees of freedom for Que 13.9 (iv). I cannot seem to understand how the degrees of freedom for the models were calculated. Can someone please explain that.
     
    Molly likes this.
  10. Molly

    Molly Ton up Member

    Hi Tinashe,

    I also find this very confusing!

    the base model has two parameters (for this i am unsure why, could someone explain this)
    we then add (n-1) parameters for each factor added where n is the number of categories in the factor

    so with YO+FS+TC we have YO as the base, FS we then add (2-1) and then a further (2-1) for TC
    =4 parameters

    then YO+FS+YO.FS+TC
    can also be written as YO+FS+TC+YO.FS
    so we have the 4 parameters from above covering the first three terms
    then we have an interactive factor this adds (n-1)(m-1) where again n and m are the respective categories
    both YO and FS have 2 categories ie (2-1)(2-1)=1
    so we have 5 parmeters

    i cannot help you with the last one, as i dont understand it myself, i get to seven parameters but the answer is 8. if anyone can help up on this that would be really appreciated!

    Thanks
     
    Tinashe Chikwamba likes this.
  11. ykai

    ykai Ton up Member

    I guess it will helpful for understanding relationship about df and parameters.
    https://www.acted.co.uk/forums/index.php?threads/assignment-x4-8.19082/

    There are two method of claculating parameters(df),factor and variable.

    About last one,they are factors,so I guess it is 8 possible parameters(2*2*2),
    all same category:YO0.FS0.TC0,YO1.FS1.TC1
    one 1 category:YO0.FS0.TC1,YO1.FS1.TC0,YO1.FS0.TC0
    two 1 category:YO1.FS1.TC0,YO1.FS0.TC1,YO0.FS1.TC1

    In linear predictor, it may be y=factor_ijk,value of factor are above.factor is like intercept,coefficient.

    If I made a mistake, please tutors correct my mistakes.
     
    Last edited: Mar 31, 2023
  12. ykai

    ykai Ton up Member

    I guess official calculation way is YO*FS*TC=YO+FS+TC+YO.FS+FS.TC+YO.TC+YO.FS.TC
    =(2-1)+(2-1)+(2-1)
    +(2-1)*(2-1)+(2-1)*(2-1)+(2-1)*(2-1)
    +(2-1)*(2-1)*(2-1)=7
    Mode3 has 7 more parameters than constant model, so we calculated as 7-7.
    Although I guess the official calculation is probably like this, but I still want to ask the tutor where the 1 comes from in the official calculation?
     
    Last edited: Mar 31, 2023
    Molly likes this.
  13. ykai

    ykai Ton up Member

    What I mean is that 1 which is deducted from model1~3 in official calculation,except for constant model.
     
    Molly likes this.
  14. Molly

    Molly Ton up Member

    Thanks so much Ykai!!

    ive been looking at this for a whilec, i think i can make sense of it:
    we have
    YO*FS*TC
    focusing on first two terms
    YO*FS=YO+FS+YO.FS
    now subbing this in to the desired equation
    (YO+FS+YO.FS)*TC
    = YO+FS+YO.FS+TC+ YO.TC+FS.TC+YO.FS.TC

    =2 params for base model YO
    +(2-1)=1 for FC
    +(2-1)(2-1)=1 for YO.FC
    +(2-1)=1 for TC
    +(2-1)(2-1)=1 for YO.TC
    +(2-1)(2-1)=1 for FS.TC
    +(2-1)(2-1)(2-1)=1 YO.FS.TC

    =2+1+1+1+1+1+1= 8 params as required

    please can a tutor verify this method is ok?

    Thanks
     
    Andrea Goude likes this.
  15. Molly

    Molly Ton up Member

    also, have absolutely no idea how we would calcualte degrees of freedom. it seems that dof are in a sense top down (as in we can lose dofs), while params are bottom up.

    but what would be the initial dof to start subtracting from?

    thanks
    molly
     
  16. Molly

    Molly Ton up Member

    i think what has happened here is that you havent left YO as a base model... i guess? definitely not 100% on this

     
  17. ykai

    ykai Ton up Member

    I just can't sure about where 1 df of constant model come from.Why is constant model is -1df?I want to know it.
     
    Last edited: Apr 1, 2023
    Molly likes this.
  18. ykai

    ykai Ton up Member

    I type wrong,the extra 1df of model1~3.
     
  19. Molly

    Molly Ton up Member

    i am unsure on this too...
     
  20. Andrea Goude

    Andrea Goude ActEd Tutor Staff Member

    you would estimate the constant so it has 1 parameter
     
  21. ykai

    ykai Ton up Member

    But when we calculate model1~3, don’t the constant parameters disappear? Just like assignment X4-8, the constant parameter is merged in the later models, doesn't it?or could you give me parameterised form of the linear predictor of this question or what I do in assignment X4-8? I may understand more clearly.
     

Share This Page