<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I set up PROC GLIMMIX for simple biology problem? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314749#M16580</link>
    <description>&lt;P&gt;Yes, this is real data being analyzed for publication. Using chi-square to look at difference in first-year dispersal between males and females is of course one question that could be asked, but the question here is difference in dispersal over all years of birds' lives. Is GLIMMIX set up with the indicated code appropriate for that analysis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks PG,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2016 07:10:31 GMT</pubDate>
    <dc:creator>r1231</dc:creator>
    <dc:date>2016-11-28T07:10:31Z</dc:date>
    <item>
      <title>How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314613#M16571</link>
      <description>&lt;P&gt;In a paper on reintroduced cranes, I have data like this: ID, Sex, Year, Out* (e.g., 1-01, M, 2002, 1)&lt;BR /&gt;I want to show that females disperse more than males.&lt;BR /&gt;I used chi-square. Reviewer indicated this violated assumption of independence because of multiple years of data for same birds and that I should use GLIMMIX.&lt;BR /&gt;What are lines of code needed to set up model?&lt;BR /&gt;SAS version 9.x (latest)&lt;BR /&gt;*Dispersal: 1 = Out of reintroduction area. 0 = In reintro. area.&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;id = identification code for each bird.&lt;BR /&gt;out = dispersal value (=1 if out of reintro. area); each bird has data in 1 or more years (observations).&lt;BR /&gt;This code:&lt;BR /&gt;proc glimmix;&lt;BR /&gt;title 'difference in dispersal by sex including all birds';&lt;BR /&gt;class sex id;&lt;BR /&gt;model out = sex / link=logit dist=binomial;&lt;BR /&gt;random int / subject=id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Produces these results: Type III Tests of Fixe Effects:&lt;BR /&gt;Effect = Sex, Num DF = 1, Den DF = 568, F Value = 5.26, Pr &amp;gt; F = 0.0221&lt;BR /&gt;Does this look correct? Thanks, Richard&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 16:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314613#M16571</guid>
      <dc:creator>r1231</dc:creator>
      <dc:date>2016-11-27T16:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314659#M16575</link>
      <description>&lt;P&gt;Is this a real experimental dataset or some academic exercise?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xl Excel "&amp;amp;sasforum\datasets\crane dispersal data.xlsx" access=readonly;

proc sql;
create table cranes as
select * 
from xl.'Sheet1$'n;
quit;

proc sql;
create table firstSighthings as
select *
from cranes
group by ID
having year = min(year);
quit;

proc freq data=firstSighthings;
table sex*out / chisq;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What surprises me is that the frequency table shows a perfect equilibrium in first sightings locations (79, for both in and out).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, the Chi-square and Fisher's tests indicate that initial dispersion of females is significantly greater than initial dispersion of males. That, in itself, shows a difference in behaviour. &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2016 21:33:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314659#M16575</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-27T21:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314749#M16580</link>
      <description>&lt;P&gt;Yes, this is real data being analyzed for publication. Using chi-square to look at difference in first-year dispersal between males and females is of course one question that could be asked, but the question here is difference in dispersal over all years of birds' lives. Is GLIMMIX set up with the indicated code appropriate for that analysis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks PG,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 07:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/314749#M16580</guid>
      <dc:creator>r1231</dc:creator>
      <dc:date>2016-11-28T07:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315087#M16601</link>
      <description>&lt;P&gt;I think it is. I would write it as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=cranes;
class sex id;
model out(event='1') = sex / link=logit dist=binary solution;
random int / subject=id;
lsmeans sex / ilink;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and get essentially the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 04:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315087#M16601</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-29T04:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315944#M16647</link>
      <description>&lt;P&gt;And to accommodate year, add on to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats﻿&lt;/a&gt;' code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=cranes;
class sex year id;
model out(event='1') = sex|year / link=logit dist=binary solution;
random int / subject=id;
random year/residual subject=id type=unr;
lsmeans sex year sex*year/ ilink;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I picked an unstructured correlation matrix (type=unr) assuming that the number of years was small.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 14:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315944#M16647</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-12-01T14:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315951#M16648</link>
      <description>&lt;P&gt;Thanks Steve. I now have 4 sets of codes for the PROC GLIMMIX problem and am working on which one to use. I don't think the YEAR variable is relevant to this problem; it is basically functioning only as an observation no.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 14:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315951#M16648</guid>
      <dc:creator>r1231</dc:creator>
      <dc:date>2016-12-01T14:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315964#M16651</link>
      <description>&lt;P&gt;Probably that is the case, but this would address the reviewer's concern outlined in the first post. &amp;nbsp;It would also give you the correlations over time of the observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 15:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/315964#M16651</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-12-01T15:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set up PROC GLIMMIX for simple biology problem?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/971462#M48812</link>
      <description>&lt;P&gt;Yes, your &lt;CODE&gt;PROC &lt;/CODE&gt;&amp;nbsp;glimmix setup looks correct. You're using a logistic model for the binary outcome (&lt;CODE&gt;out&lt;/CODE&gt;) with &lt;CODE&gt;sex&lt;/CODE&gt; as a fixed effect and &lt;CODE&gt;id&lt;/CODE&gt; as a random effect to account for repeated measures per bird — which addresses the reviewer's concern about independence. Your result (&lt;CODE&gt;p = 0.0221&lt;/CODE&gt;) suggests a significant effect of sex on dispersal. Nice work!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 09:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-set-up-PROC-GLIMMIX-for-simple-biology-problem/m-p/971462#M48812</guid>
      <dc:creator>ArdigenSupport</dc:creator>
      <dc:date>2025-07-25T09:10:56Z</dc:date>
    </item>
  </channel>
</rss>

