<div dir="ltr"><div id="parent-fieldname-description" class="" style="margin:0em 0em 0.5em"><span style="line-height:19.5px"><b>I have posted previously an approach of generalizing TPL files using model.matrix in R to create design matrices for fixed effect models. Using the TPL and R code in glmmadmb as my reference point, with my co-authors Hans Skaug and Devin Johnson, I have created a simple example that shows how you can create a general TPL file and use R to construct the necessary data structures from a formula and data frame for random or mixed effect models. The example we construct is for mixed effects logistic regression but it can be modified as you wish. It is the approach that we are trying to illustrate rather than the particular example. Hans will post this as an example on the website.</b></span></div>
<div id="parent-fieldname-description" class="" style="margin:0em 0em 0.5em"><span style="line-height:19.5px"><b><br></b></span></div><div id="parent-fieldname-description" class="" style="margin:0em 0em 0.5em"><span style="line-height:19.5px"><b>Building General Random Effect Models with R </b></span><b style="line-height:19.5px">and ADMB</b><br>
</div><div id="content-core"><div class="" id="parent-fieldname-text-e9aac386-d462-47b7-9e5f-6218d6e3e355"><h3 style="color:black;font-family:'Lucida Grande',Verdana,Lucida,Helvetica,Arial,sans-serif;margin:0.75em 0px 0.25em;font-size:15px;border-bottom-style:none">
Model description</h3><div> <a href="https://github.com/jlaake/ADMB-Examples/blob/master/mixed_example.pdf">https://github.com/jlaake/ADMB-Examples/blob/master/mixed_example.pdf</a></div><h3 style="color:black;font-family:'Lucida Grande',Verdana,Lucida,Helvetica,Arial,sans-serif;margin:0.75em 0px 0.25em;font-size:15px;border-bottom-style:none">
All files</h3><div><a href="https://github.com/jlaake/ADMB-Examples/tree/master/Mixed%20Effect%20Modelling">https://github.com/jlaake/ADMB-Examples/tree/master/Mixed%20Effect%20Modelling</a><br></div><p style="margin:0px 0px 0.75em;line-height:1.5em">
<br></p></div></div><div class="" style="clear:both"></div><div class="" style="margin:1em 0px;padding:0px;text-align:right;border-top-width:1px;border-top-style:solid;border-top-color:rgb(116,174,11)"><h5 class="" style="color:rgb(118,121,124);font-family:'Lucida Grande',Verdana,Lucida,Helvetica,Arial,sans-serif;font-size:12px;border:none;background-image:none;height:1px;overflow:hidden;padding:0px;width:1px">
Document Actions</h5><div><br></div></div></div>