7
Solutions to problems Solved problems: 4.1, H:1, HTF 5.1, 5.5

Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at

Solutions to problems

Solved problems: 4.1, H:1, HTF 5.1, 5.5

Page 2: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at

the R-code for problem 4.1.. #Ex. 4.1 #Load library stats library(stats) #Write datafram with all possible combination of factors 4*4*4=64 dd <- data.frame(A = gl(4,16), B = gl(4,1,64), C = gl(4,4,64)) #Say that you want some ( e.g. here sum-to-zero) constraints on main and first-order effects options("contrasts") #In model.matrix: 1. define model, ()^2 indicates that the model should include first-order interactions; #2. give all possible combinations in a dataframe, 3. give constraints in a list vector model.matrix(~ (A + B + C)^2, dd, contrasts = list(A = "contr.sum",B = "contr.sum", C = "contr.sum"))

Page 3: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at
Page 4: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at
Page 5: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at
Page 6: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at
Page 7: Solved problems: 4.1, H:1, HTF 5.1, 5 - Chalmersrootzen/highdimensional/solutions2.pdf · to a 6 dimensional system of equations: The cubic functions between the knots require at