{"id":417,"date":"2017-05-06T04:32:32","date_gmt":"2017-05-06T04:32:32","guid":{"rendered":"http:\/\/sites.warnercnr.colostate.edu\/gwhite\/?page_id=417"},"modified":"2017-05-06T05:15:54","modified_gmt":"2017-05-06T05:15:54","slug":"design-matrix-advanced-applications-2","status":"publish","type":"page","link":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/design-matrix-advanced-applications-2\/","title":{"rendered":"Design Matrix &#8212; Advanced Applications 2"},"content":{"rendered":"<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\"><a href=\"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/mark-program-help-file-contents\/\">Contents<\/a> &#8211; <a href=\"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/mark-program-help-file-index\/\">Index<\/a><\/span><\/p>\n<hr \/>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: medium\"><b>Design Matrix &#8212; Advanced Applications 2<\/b><\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">Advanced applications of the <a href=\"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/design-matrix\/\">Design Matrix<\/a> involve constraining parameters across groups.\u00a0 Suppose that a set of recapture data have 2 groups, say males and females.\u00a0 Then, the 4 parameter matrices for a time model for each parameter for each group might look like the following.<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 Apparent Survival Group 1<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 1\u00a0 2\u00a0 3\u00a0 4\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0 2\u00a0 3\u00a0 4\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3\u00a0 4\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 4\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 Apparent Survival Group 2<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 5\u00a0 6\u00a0 7\u00a0 8\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0 6\u00a0 7\u00a0 8\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7\u00a0 8\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 8\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 Recapture Probabilities Group 1<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 9\u00a0 10\u00a0 11\u00a0 12\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0 10\u00a0 11\u00a0 12\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 11\u00a0 12\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 Recapture Probabilities Group 2<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0 13\u00a0 14\u00a0 15\u00a0 16\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0 14\u00a0 15\u00a0 16\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 15\u00a0 16\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 16\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">Consider the additive effects model that is only possible by using the design matrix: {Phi(<i>g+t<\/i>) <i>p<\/i>(<i>g+t<\/i>)}.\u00a0 In this model, the\u00a0 time effect is the same for each group, with the group effect additive to this time effect.\u00a0 In the following matrix, column 1 is the group effect for apparent survival, columns 2-5 are the time effects for apparent survival, column 6 is the group effect for recapture probabilities, and columns 7-10 are the time effects for the recapture probabilities.\u00a0 Note that the group effect is zero for the second group, and 1 for the first group.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1\u00a0 0 0 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 1 0 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 1 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 1 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 0 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 1 0 0 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 1 0 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 1 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 0 1 0 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 0 0 1 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 0 0 0 1 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 0 1 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 0 0 1 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 0 0 0 1 0\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">An alternative way of coding the above design matrix is shown next.\u00a0 This alternative uses an intercept term, followed by the time effects, followed by the group effects.\u00a0 The first column corresponds to the estimate of survival for the second group on the fourth interval.\u00a0 The resulting estimates of the real parameters will be identical to the example above, but the interpretation of the beta estimates will be different.\u00a0 In general, an infinite number of design matrices can produce identical estimates of the real parameters.<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1\u00a0 1 0 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 1 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 1 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 1 0 0 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 1 0 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 1 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 0 0 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 1 0 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 1 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 1 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 1 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 1 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 1 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 0 0\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">The following example is also equivalent to the 2 preceding examples.\u00a0 However, in this case, the design matrix is constructed to compute the overall mean survival and recapture rates as the &#8220;intercept&#8221; parameter.\u00a0 This approach requires the use of 1 and -1 coding, instead of 0 and 1 coding.\u00a0 The group effect is now half of the difference between the 2 groups, with the &#8220;half&#8221; effect added onto group 1, but subtracted from group 2.<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1\u00a0 1 0 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 1 0 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 1 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 -1 -1 -1 1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 1 0 0 -1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 1 0 -1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 0 0 1 -1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">1 -1 -1 -1 -1 0 0 0 0 0\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 1 0 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 1 0 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 1 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 -1 -1 -1 1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 1 0 0 -1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 1 0 -1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 0 0 1 -1\u00a0<\/span><br \/>\n<span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">0 0 0 0 0 1 -1 -1 -1 -1\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;font-family: Arial, helvetica, sans-serif;font-size: small\">See <a href=\"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/design-matrix-scaling-covariates\/\">Design Matrix Scaling Covariates<\/a> for why &#8220;reasonable&#8221; values should be used in the design matrix.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents &#8211; Index Design Matrix &#8212; Advanced Applications 2 Advanced applications of the Design Matrix involve constraining parameters across groups.\u00a0 Suppose that a set of recapture data have 2 groups, say males and females.\u00a0 Then, the 4 parameter matrices for &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/design-matrix-advanced-applications-2\/\"> <span class=\"screen-reader-text\">Design Matrix &#8212; Advanced Applications 2<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":117,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-417","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/pages\/417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/users\/117"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/comments?post=417"}],"version-history":[{"count":3,"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/pages\/417\/revisions"}],"predecessor-version":[{"id":433,"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/pages\/417\/revisions\/433"}],"wp:attachment":[{"href":"https:\/\/sites.warnercnr.colostate.edu\/gwhite\/wp-json\/wp\/v2\/media?parent=417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}