Assignment X4-8

Discussion in 'CS1' started by ykai, Mar 10, 2023.

  1. ykai

    ykai Ton up Member

    Why the fifth model's amount of parameter is 120?
    By knowledge from CMP,
    I know first model is constants+ coffecient of one variable=2.
    I know second model is 2+(10-1)=11.
    I know third model is 2+(10-1)+(2-1)(10-1)=20.
    I know fourth model is 2+(10-1)+(2-1)(10-1)+(6-1)=25.
    But I have no idea about fifth model.I guess it is 2*10*6,but I don't know the logic.

    It will resulted in can't count amount of parameter of fourth model, if I just calculate parameters.
    SA=alpha+beta=2
    SA+PT=alpha_i+beta=11
    SA*PT=alpha_i+beta_i=10+10=20
    SA*PT+NB=alpha_i+beta_i+B_j=10+10+6=26
     
  2. Andrea Goude

    Andrea Goude ActEd Tutor Staff Member

    Hi Ykai

    The question gives you the 120
    SA*PT+NB=alpha_i+beta_i+B_j=2+(10-1)+(2-1)(10-1)+(6-1)=25
    SA*PT*NB=alpha_ij+beta_ij=2+(10-1)+(2-1)(10-1)+(6-1)+(2-1)(6-1)+(10-1)(6-1)+(2-1)(10-1)(6-1)=120
    you add on all the interactions SA*NB+PT*NB+SA*PT*NB to the previous model

    Rule for interactions are (n-1)*(m-1) where n and m are the number of parameters you would have used for the effects on their own

    Thanks Andrea
     
    ykai likes this.
  3. ykai

    ykai Ton up Member

    Thank you for answer.I have understand the method of calculation,but I still have question about display all possible parameter directly.

    The 25 one,SA*PT+NB, I guess it have 10 kinds of alpha from constant*T_i +10 kinds of beta from T_i*coffecient of x+6 kinds of B_j, so I think it is a total of 26 parameters not 25.

    Paremeters are alpha_1,alpha_2,alpha_3,alpha_4,alpha_5,alpha_6,alpha_7,alpha_8,alpha_9,alpha_10
    beta_1,beta_2,beta_3,beta_4,beta_5,beta_6,beta_7,beta_8,beta_9,beta_10
    B_1,B_2,B_3,B_4,B_5,B_6

    After I read CH13-section3.3-p25, I think what I thought may be right.
    Which part of what I said is wrong?
     
  4. Andrea Goude

    Andrea Goude ActEd Tutor Staff Member

    alpha_1 and B_1 would combine, as it is the sum of two constants, working from model 3, so the base level is one bedroom and property type 1, you would then add on a value for the other 5 possible bedroom combinations, so lose B_1 from your list, giving 25 parameters in total OR lose alpha_1
     
    ykai likes this.
  5. ykai

    ykai Ton up Member

    Thank you!I have unserstood, like constant is merged with T_1.
     

Share This Page