[prev in list] [next in list] [prev in thread] [next in thread]
List: sas-l
Subject: Re: dataset for genmod
From: "Martin, Vincent (STATCAN)" <vincent.martin () CANADA ! CA>
Date: 2020-01-31 22:56:36
Message-ID: d1e564e9c0194918ab382b30e18d9aec () PELEPCDEXC011 ! birch ! int ! bell ! ca
[Download RAW message or body]
[Attachment #2 (text/plain)]
I didn't see why genmod would require summarized data. The example below shows \
different type3 stats output between the response/trials syntax and the response \
syntax but both the aggregated and disaggregated version of each syntax produces the \
same type3. For what it's worth, the WALD version of type3 are equal in all cases.
I glanced through the mathematical details but I'd need to go back to textbooks to \
understand fully. Anyway, maybe you can figure out why for yourself with the example \
below. Data is from a SAS Help example. All 4 variants produce the same model \
estimates.
data insure;
input n c car$ age;
ln = log(n);
datalines;
500 42 small 1
1200 37 medium 1
100 1 large 1
400 101 small 2
500 73 medium 2
300 14 large 2
;
run;
data insure_tall;
set insure;
do i=1 to n;
if i<=c then response=1;
else response=0;
dummy=1;
output;
end;
run;
/*example */
proc genmod data=insure;
class car age;
model c=car|age / type3 link=log dist=poisson offset=ln;
run;
proc genmod data=insure_tall;
class car age response;
model response(event='1')=car|age / type3 link=log dist=poisson;/* not \
aggregated. */ run;
proc genmod data=insure_tall;
class car age response;
model response/dummy=car|age / type3 link=log dist=poisson;/* not aggregated. \
*/ run;
proc genmod data=insure;
class car age;
model c/n=car|age / type3 link=log dist=poisson;
run;
Vincent Martin
Senior Methodologist – Social Statistics Methods Division, Analytical Studies, \
Methodology and Statistical Infrastructure Field Statistics Canada / Government of \
Canada vincent.martin@canada.ca<mailto:vincent.martin@canada.ca> / Tel: 613-853-7135
Méthodologiste principal — Division des méthodes de la statistique sociale, \
Secteur des études analytiques, de la méthodologie et de l'infrastructure \
statistique Statistique Canada / Gouvernement du Canada
vincent.martin@canada.ca<mailto:vincent.martin@canada.ca> / Tél. : 613-853-7135
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Dennis Fisher
Sent: January-31-20 12:48 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: dataset for genmod
Yes that looks like the case. We might be able to get the raw data from David Mink \
who is still active. Yes I agree with you that the issue is whether GENMOD really \
does require the count variable. Why can't GENMOD just use a _response_ type of \
thing like CATMOD? If , as you say, if _response_ is to CATMOD as count is to \
GENMOD. I will let you know if/when I can get the data from David Mink. There are \
examples in several books on categorical data analysis in SAS that have this form of \
the data, i.e., with a count variable so it looks to be very common.
From: data _null_; <datanull@gmail.com<mailto:datanull@gmail.com>>
Sent: Friday, January 31, 2020 9:09 AM
To: Dennis Fisher <Dennis.Fisher@csulb.edu<mailto:Dennis.Fisher@csulb.edu>>
Cc: sas-l <SAS-L@listserv.uga.edu<mailto:SAS-L@listserv.uga.edu>>
Subject: Re: dataset for genmod
So nothing to do with events/trials.
Looking at the paper I believe the output from PROC SUMMARY are the same counts \
displayed in the output from PROC FREQ.
In the CATMOD model does _REPONSE_ imply COUNT?
proc catmod data=pt_meds01 order=data;
Title4 "PROC CATMOD General Test of Homogeneity";
model severity * grp * dose_cng = _response_ /
ml noiter noresponse nodesign nogls NOPROFILE ZERO=sampling;
loglin severity|grp|dose_cng@2 /title="No 3-way association";
run; quit;
Which to me looks to be the same as COUNT in the GENMOD model.
proc genmod data=pt_meds03;
class severity grp dose_cng / param=effect;
model count=severity|grp|dose_cng /link=log dist=poisson type3;
run;
I would be nice to have the actual data so we could test if GENMOD model requires \
summary data.
On Fri, Jan 31, 2020 at 10:27 AM Dennis Fisher \
<Dennis.Fisher@csulb.edu<mailto:Dennis.Fisher@csulb.edu>> wrote: From page 5 of paper \
74949 by Lai, Mink, & Pasta "Beyond Breslow-Day: Homogeneity Across R x C Tables".
PROC GENMOD and PROC GLIMMIX have the ability to output the homogeneity statistics \
with the type 3 analysis option, Both methods fit generalized linear modes using \
maximum-likelihood methods. In order to test for the 3-way association using PROC \
GENMOD and PROC GLIMMIX we need to first collapse the data into "count" level. In \
other words, we summarized the data to obtain all the counts in each 2 x 3 x 3 \
combination as in Figure 5.
Data pt_meds02;
Set pt_meds01;
Count=1 ;
Run ;
Proc summary data = pt_meds02 nway ;
Class severity grp dose_cng ;
Var count ;
Output out=pt_meds03 sum= ;
Then they use this output dataset in proc genmod with the following code
Proc genmod data = pt_meds03;
Class severity grp dose_cng / param = effect;
Model count = severity|grp|dose_cng / link=log dist=poisson type3 ;
Run ;
This code works, but I do not understand what genmod is doing and why the data need \
to be in this form. TIA
Dennis
Dennis G. Fisher, PhD
Professor (Emeritus)
Psychology Department
Center for Behavioral Research and Services
California State University, Long Beach
"The three purposes of the University?--To provide sex for the students, sports for \
the alumni, and parking for the faculty." Clark Kerr
From: data _null_; <datanull@gmail.com<mailto:datanull@gmail.com>>
Sent: Friday, January 31, 2020 8:11 AM
To: Dennis Fisher <Dennis.Fisher@csulb.edu<mailto:Dennis.Fisher@csulb.edu>>
Cc: sas-l <SAS-L@listserv.uga.edu<mailto:SAS-L@listserv.uga.edu>>
Subject: Re: dataset for genmod
Are you asking about events/trials form of model statement? Which PROCs require \
event/trials? The following is from GEMOD documentation and you can see that it \
supports both forms.
MODEL response <(variable-options)> = <effects> </ options>;
MODEL events/trials = <effects> </ options>;
On Fri, Jan 31, 2020 at 10:00 AM Dennis Fisher \
<Dennis.Fisher@csulb.edu<mailto:Dennis.Fisher@csulb.edu>> wrote: One of the topics \
that I do not remember seeing discussed on sas-l is the form of the data required for \
procs such as genmod. I first started using SAS in 1984 and the big thing was making \
sure that you sorted the data before merging. Then the next big revolution was the \
distinction between the wide form and the long form of the data. Now I have run into \
a requirement that the data needs to be in the form of each combination of the \
variables with a count variable for how many times in the data that profile is found \
in the data. My only experience with this previously was in the book by Schlotzhaur \
in which she talks about how to do a chi-square from an existing table by using a \
count variable and then a weight statement so at least I had seen this before. \
Fortunately, I had a WUSS paper in front of me by Pai, Mink, and Pasta that used code \
using proc summary to create this. Do any of you more formally trained programmers \
know what this kind of data is technically termed and why are some of the procs now \
requiring this? Thanks.
Dennis
Dennis G. Fisher, PhD
Professor (Emeritus)
Psychology Department
Center for Behavioral Research and Services
California State University, Long Beach
"The three purposes of the University?--To provide sex for the students, sports for \
the alumni, and parking for the faculty." Clark Kerr
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.gmail-m771112483320857977gmail-aa-statement
{mso-style-name:gmail-m_771112483320857977gmail-aa-statement;}
span.gmail-m771112483320857977gmail-aa-statementoptional
{mso-style-name:gmail-m_771112483320857977gmail-aa-statementoptional;}
span.gmail-m771112483320857977gmail-aa-keyword
{mso-style-name:gmail-m_771112483320857977gmail-aa-keyword;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">I didn't \
see why genmod would require summarized data. The example below shows different type3 \
stats output between the response/trials syntax and the response syntax but both the \
aggregated and disaggregated version of each syntax produces the same type3. For \
what it's worth, the WALD version of type3 are equal in all \
cases.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="color:#1F497D;mso-fareast-language:EN-US">I glanced \
through the mathematical details but I'd need to go back to textbooks to understand \
fully. Anyway, maybe you can figure out why for yourself with the example below. Data \
is from a SAS Help example. All 4 variants produce the same model \
estimates.<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white"><o:p> </o:p></span></b></p> <p \
class="MsoNormal" style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">data</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> insure;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">input</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> n c car$ age;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> ln = \
log(n);<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">datalines</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:#FFFFC0">500 42 small \
1<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:#FFFFC0">1200 37 medium \
1<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:#FFFFC0">100 1 large \
1<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:#FFFFC0">400 101 small \
2<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:#FFFFC0">500 73 medium \
2<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:#FFFFC0">300 14 large \
2<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">run</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"><o:p> </o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">data</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> insure_tall;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">set</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> insure;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">do</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> i=</span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:teal;background:white">1</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">to</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> n;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">
</span><span style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">if</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> i<=c </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">then</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> response=</span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:teal;background:white">1</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">
</span><span style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">else</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> response=</span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:teal;background:white">0</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> \
dummy=</span><b><span style="font-size:10.0pt;font-family:"Courier \
New";color:teal;background:white">1</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">
</span><span style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">output</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">end</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">run</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"><o:p> </o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:green;background:white">/*example */</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"><o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">proc</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">genmod</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">data</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=insure;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">class</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> car age;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">model</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> c=car|age / </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">type3</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">link</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=log </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">dist</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=poisson </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">offset</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=ln;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">run</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">proc</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">genmod</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
<p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">class</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> car age response;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">model</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> response(event=</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:purple;background:white">'1'</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">)=car|age / </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">type3</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">link</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=log </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">dist</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=poisson;</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:green;background:white">/* not aggregated. */</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"><o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">run</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">proc</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">genmod</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">data</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=insure_tall;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">class</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> car age response;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">model</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> response/dummy=car|age / </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">type3</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">link</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=log </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">dist</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=poisson;</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:green;background:white">/* not aggregated. */</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"><o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">run</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">proc</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">genmod</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">data</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=insure;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">class</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> car age;<o:p></o:p></span></p> <p \
class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">model</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> c/n=car|age / </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">type3</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white"> </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">link</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=log </span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:blue;background:white">dist</span><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">=poisson;<o:p></o:p></span></p> <p \
class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier \
New";color:navy;background:white">run</span></b><span \
style="font-size:10.0pt;font-family:"Courier \
New";color:black;background:white">;</span><span \
style="color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span \
style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p> <div>
<p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Vincent \
Martin<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Senior \
Methodologist – Social Statistics Methods Division, Analytical Studies, Methodology \
and Statistical Infrastructure Field<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Statistics \
Canada / Government of Canada<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><a \
href="mailto:vincent.martin@canada.ca"><span style="font-family:"Times New \
Roman",serif;color:#0563C1">vincent.martin@canada.ca</span></a> / Tel: \
613-853-7135<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="FR-CA" \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Méthodologiste \
principal — Division des méthodes de la statistique sociale, Secteur des études \
analytiques, de la méthodologie et de l'infrastructure \
statistique<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span lang="FR-CA" \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Statistique \
Canada / Gouvernement du Canada<o:p></o:p></span></p> <p class="MsoNormal" \
style="text-autospace:none"><span lang="FR-CA" \
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><a \
href="mailto:vincent.martin@canada.ca"><span style="font-family:"Times New \
Roman",serif;color:#0563C1">vincent.martin@canada.ca</span></a> / Tél. : \
613-853-7135<o:p></o:p></span></p> </div>
<p class="MsoNormal"><span lang="FR" \
style="color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p> <div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span \
lang="EN-US">From:</span></b><span lang="EN-US"> SAS(r) Discussion \
[mailto:SAS-L@LISTSERV.UGA.EDU] <b>On Behalf Of </b>Dennis Fisher<br>
<b>Sent:</b> January-31-20 12:48 PM<br>
<b>To:</b> SAS-L@LISTSERV.UGA.EDU<br>
<b>Subject:</b> Re: dataset for genmod<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">Yes that looks \
like the case. We might be able to get the raw data from David Mink who is \
still active. Yes I agree with you that the issue is whether GENMOD really does \
require the count variable. Why can't GENMOD just use a \
_<i>response_ </i>type of thing like CATMOD? If , as you say, if \
_<i>response</i>_ is to CATMOD as count is to GENMOD. I will let you know \
if/when I can get the data from David Mink. There are examples in several \
books on categorical data analysis in SAS that have this form of the data, i.e., with \
a count variable so it looks to be very common. <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> \
data _null_; <<a href="mailto:datanull@gmail.com">datanull@gmail.com</a>> <br>
<b>Sent:</b> Friday, January 31, 2020 9:09 AM<br>
<b>To:</b> Dennis Fisher <<a \
href="mailto:Dennis.Fisher@csulb.edu">Dennis.Fisher@csulb.edu</a>><br> <b>Cc:</b> \
sas-l <<a href="mailto:SAS-L@listserv.uga.edu">SAS-L@listserv.uga.edu</a>><br> \
<b>Subject:</b> Re: dataset for genmod<o:p></o:p></span></p> <p class="MsoNormal" \
style="margin-left:36.0pt"><span lang="EN-US"><o:p> </o:p></span></p> <div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">So nothing to do \
with events/trials. <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">Looking at the \
paper I believe the output from PROC SUMMARY are the same counts displayed in the \
output from PROC FREQ. <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">In the CATMOD \
model does _REPONSE_ imply COUNT? <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">proc catmod \
data=pt_meds01 order=data; <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> \
Title4 "PROC CATMOD General Test of Homogeneity"; \
<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> model \
severity * grp * dose_cng = <b>_response_</b> / <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> \
ml noiter noresponse nodesign nogls NOPROFILE \
ZERO=sampling; <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> \
loglin severity|grp|dose_cng@2 /title="No 3-way \
association"; <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<span lang="EN-US"> run; quit;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">Which to me looks \
to be the same as COUNT in the GENMOD model.<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">proc genmod \
data=pt_meds03;<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> \
class severity grp dose_cng / param=effect;<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> \
model count=severity|grp|dose_cng /link=log dist=poisson type3;<o:p></o:p></span></p> \
</div> <div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US"> run; \
<o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">I would be nice to \
have the actual data so we could test if GENMOD model requires summary \
data.<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> </div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span \
lang="EN-US"><o:p> </o:p></span></p> <div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">On Fri, Jan 31, \
2020 at 10:27 AM Dennis Fisher <<a \
href="mailto:Dennis.Fisher@csulb.edu">Dennis.Fisher@csulb.edu</a>> \
wrote:<o:p></o:p></span></p> </div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm \
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"> <div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">From page 5 of paper 74949 by Lai, Mink, & Pasta "Beyond \
Breslow-Day: Homogeneity Across R x C Tables". <o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">PROC GENMOD and PROC GLIMMIX have the ability to output the homogeneity \
statistics with the type 3 analysis option, Both methods fit generalized linear \
modes using maximum-likelihood methods. <o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">In order to test for the 3-way association using PROC GENMOD and PROC \
GLIMMIX we need to first collapse the data into "count" level. In other words, \
we summarized the data to obtain all the counts in each 2 x 3 x 3 combination as in \
Figure 5. <o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Data pt_meds02; <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> Set pt_meds01;<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Count=1 ;<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Run ;<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Proc summary data = pt_meds02 nway ;<o:p></o:p></span></p> <p \
class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Class severity grp dose_cng ;<o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Var count ;<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Output out=pt_meds03 sum= ; <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Then they use this output dataset in proc genmod with the following code \
<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Proc genmod data = pt_meds03; <o:p></o:p></span></p> <p \
class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Class severity grp dose_cng / param = effect; \
<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Model count = severity|grp|dose_cng / link=log dist=poisson type3 \
;<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Run ; <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">This code works, but I do not understand what genmod is doing and why \
the data need to be in this form. <o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">TIA <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Dennis<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Dennis G. Fisher, PhD<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Professor (Emeritus)<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Psychology Department<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Center for Behavioral Research and Services<o:p></o:p></span></p> <p \
class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">California State University, Long Beach<o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">"The three purposes of the University?--To provide sex for the \
students, sports for the alumni, and parking for the \
faculty."<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> \
<b><span lang="EN-US">Clark Kerr</span></b><span lang="EN-US"><o:p></o:p></span></p> \
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> \
<b><span lang="EN-US">From:</span></b><span lang="EN-US"> data _null_; <<a \
href="mailto:datanull@gmail.com" target="_blank">datanull@gmail.com</a>> <br>
<b>Sent:</b> Friday, January 31, 2020 8:11 AM<br>
<b>To:</b> Dennis Fisher <<a href="mailto:Dennis.Fisher@csulb.edu" \
target="_blank">Dennis.Fisher@csulb.edu</a>><br> <b>Cc:</b> sas-l <<a \
href="mailto:SAS-L@listserv.uga.edu" \
target="_blank">SAS-L@listserv.uga.edu</a>><br> <b>Subject:</b> Re: dataset for \
genmod<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <div>
<div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Are you asking about events/trials form of model statement? Which \
PROCs require event/trials? The following is from GEMOD documentation and you \
can see that it supports both forms.<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
class="gmail-m771112483320857977gmail-aa-statement"><span \
lang="EN-US">MODEL</span></span><span lang="EN-US"> <span \
class="gmail-m771112483320857977gmail-aa-statementoptional">response \
<(variable-options)> </span><span \
class="gmail-m771112483320857977gmail-aa-keyword">=</span><span \
class="gmail-m771112483320857977gmail-aa-statementoptional"> <effects> </ \
options></span>; <o:p></o:p></span></p>
<p style="margin-left:36.0pt"><span \
class="gmail-m771112483320857977gmail-aa-statement"><span \
lang="EN-US">MODEL</span></span><span lang="EN-US"> <span \
class="gmail-m771112483320857977gmail-aa-statementoptional">events/trials </span> \
<span class="gmail-m771112483320857977gmail-aa-keyword">=</span><span \
class="gmail-m771112483320857977gmail-aa-statementoptional"> <effects> </ \
options></span>; <o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">On Fri, Jan 31, 2020 at 10:00 AM Dennis Fisher <<a \
href="mailto:Dennis.Fisher@csulb.edu" target="_blank">Dennis.Fisher@csulb.edu</a>> \
wrote:<o:p></o:p></span></p> </div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm \
6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;border-color:currentColor \
currentColor currentColor rgb(204,204,204)"> <div>
<div>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">One of the topics that I do not remember seeing discussed on sas-l is \
the form of the data required for procs such as genmod. I first started using \
SAS in 1984 and the big thing was making sure that you sorted the data before \
merging. Then the next big revolution was the distinction between the wide \
form and the long form of the data. Now I have run into a requirement that the \
data needs to be in the form of each combination of the variables with a count \
variable for how many times in the data that profile is found in the data. My \
only experience with this previously was in the book by Schlotzhaur in which she \
talks about how to do a chi-square from an existing table by using a count variable \
and then a weight statement so at least I had seen this before. Fortunately, I \
had a WUSS paper in front of me by Pai, Mink, and Pasta that used code using proc \
summary to create this. Do any of you more formally trained programmers know \
what this kind of data is technically termed and why are some of the procs now \
requiring this? <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Thanks.<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Dennis<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Dennis G. Fisher, PhD<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Professor (Emeritus)<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Psychology Department<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">Center for Behavioral Research and Services<o:p></o:p></span></p> <p \
class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">California State University, Long Beach<o:p></o:p></span></p>
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US">"The three purposes of the University?--To provide sex for the \
students, sports for the alumni, and parking for the \
faculty."<o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> \
<b><span lang="EN-US">Clark Kerr</span></b><span lang="EN-US"><o:p></o:p></span></p> \
<p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> <p class="MsoNormal" \
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt"> <span \
lang="EN-US"> <o:p></o:p></span></p> </div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic