<?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 2-way ANOVA question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120039#M33052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;Hello,&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;I need to p&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;erform a two-way ANOVA by age group and sex with no interaction term, and then with an interaction term.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;When I do this, it's not recognizing the 'agegrp' variable, even though I created it earlier! Included below is the code (also includes histogram and qqplot generation) and then a portion of the log. Do you know why it is not recognizing the 'agegrp' variable in the end for the 2-way ANOVA? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;Any and all help is much appreciated!!&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*create new variable for age*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;age=int((dov-dob)/365.25);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*create age groups so that group 1 = children under 12 years old, group 2 = children 12 or older but younger than 20, group 3 = 20 or older*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;if age &amp;lt; 12 then agegrp=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;else if 12 &amp;lt;= age &amp;lt; 20 then agegrp=2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;else if age &amp;gt;=20 then agegrp=3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;title 'Distribution of periosteal circumference';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;ods graphics off;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;ods select Lognormal.ParameterEstimates Lognormal.GoodnessOfFit MyPlot;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*Create a histogram for the variable periosteal circumference to test for normality*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;proc univariate data=homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; var peri;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; histogram / lognormal(w=3 theta=est)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vaxis = axis1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&amp;nbsp; = 'MyPlot';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; inset n mean (5.3) std='Std Dev' (5.3) skewness (5.3) /&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pos = ne&amp;nbsp; header = 'Summary Statistics';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; axis1 label=(a=90 r=0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*Create a qqplot for the variable periosteal circumference to test for normality*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;title ’Normal Quantile-Quantile Plot for Periosteal Circumference’;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;proc capability data=homewrk2.test noprint;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;spec lsl=9.5 llsl=2 clsl=blue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;usl=10.5 lusl=20 cusl=blue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;qqplot peri / normal(mu=est sigma=est color=red l=2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;square&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;nospeclegend;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*Two way ANOVA by age group and sex with no interaction term. Save the predicted values into a data set called out1*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;proc glm data=homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;class sex agegrp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;model peri = sex agegrp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;/P&gt;&lt;DIV style="font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;LOG:&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman';"&gt;216&amp;nbsp; proc glm data=homewrk2.test;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;217&amp;nbsp; class sex age;&lt;/P&gt;&lt;P&gt;ERROR: Variable AGE not found.&lt;/P&gt;&lt;P&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;218&amp;nbsp; model peri = sex age;&lt;/P&gt;&lt;P&gt;ERROR: Variable age not found.&lt;/P&gt;&lt;P&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;219&amp;nbsp; run;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Feb 2013 03:43:36 GMT</pubDate>
    <dc:creator>SASstudent2013</dc:creator>
    <dc:date>2013-02-25T03:43:36Z</dc:date>
    <item>
      <title>2-way ANOVA question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120039#M33052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;Hello,&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;I need to p&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;erform a two-way ANOVA by age group and sex with no interaction term, and then with an interaction term.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;When I do this, it's not recognizing the 'agegrp' variable, even though I created it earlier! Included below is the code (also includes histogram and qqplot generation) and then a portion of the log. Do you know why it is not recognizing the 'agegrp' variable in the end for the 2-way ANOVA? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;Any and all help is much appreciated!!&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*create new variable for age*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;age=int((dov-dob)/365.25);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*create age groups so that group 1 = children under 12 years old, group 2 = children 12 or older but younger than 20, group 3 = 20 or older*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;if age &amp;lt; 12 then agegrp=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;else if 12 &amp;lt;= age &amp;lt; 20 then agegrp=2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;else if age &amp;gt;=20 then agegrp=3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;title 'Distribution of periosteal circumference';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;ods graphics off;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;ods select Lognormal.ParameterEstimates Lognormal.GoodnessOfFit MyPlot;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*Create a histogram for the variable periosteal circumference to test for normality*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;proc univariate data=homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; var peri;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; histogram / lognormal(w=3 theta=est)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vaxis = axis1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&amp;nbsp; = 'MyPlot';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; inset n mean (5.3) std='Std Dev' (5.3) skewness (5.3) /&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pos = ne&amp;nbsp; header = 'Summary Statistics';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; axis1 label=(a=90 r=0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*Create a qqplot for the variable periosteal circumference to test for normality*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;title ’Normal Quantile-Quantile Plot for Periosteal Circumference’;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;proc capability data=homewrk2.test noprint;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;spec lsl=9.5 llsl=2 clsl=blue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;usl=10.5 lusl=20 cusl=blue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;qqplot peri / normal(mu=est sigma=est color=red l=2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;square&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;nospeclegend;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;/*Two way ANOVA by age group and sex with no interaction term. Save the predicted values into a data set called out1*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;proc glm data=homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;class sex agegrp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;model peri = sex agegrp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;/P&gt;&lt;DIV style="font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;LOG:&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial; font-size: small;"&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial; font-size: small;"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman';"&gt;216&amp;nbsp; proc glm data=homewrk2.test;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;217&amp;nbsp; class sex age;&lt;/P&gt;&lt;P&gt;ERROR: Variable AGE not found.&lt;/P&gt;&lt;P&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;218&amp;nbsp; model peri = sex age;&lt;/P&gt;&lt;P&gt;ERROR: Variable age not found.&lt;/P&gt;&lt;P&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;&lt;P&gt;219&amp;nbsp; run;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 03:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120039#M33052</guid>
      <dc:creator>SASstudent2013</dc:creator>
      <dc:date>2013-02-25T03:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: 2-way ANOVA question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120040#M33053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're not referencing your datasets properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;*Dataset TEST was created in work library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;/*create new variable for age*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;age=int((dov-dob)/365.25);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-style: inherit; font-size: 12pt;"&gt;*Replace dataset TEST in work library using the test dataset from library &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;homewrk2 instead of work;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;/*create age groups so that group 1 = children under 12 years old, group 2 = children 12 or older but younger than 20, group 3 = 20 or older*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;if age &amp;lt; 12 then agegrp=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;else if 12 &amp;lt;= age &amp;lt; 20 then agegrp=2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;else if age &amp;gt;=20 then agegrp=3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;You should open your datasets or print them to make sure it's doing what you want. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;You can correct this by using doing one datastep instead. Also, make sure in further code you refer to test rather than homework.test because they're two different datasets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;set homewrk2.test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;/*create age groups so that group 1 = children under 12 years old, group 2 = children 12 or older but younger than 20, group 3 = 20 or older*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 16px; background-color: #ffffff; font-family: 'Times New Roman';"&gt;age=int((dov-dob)/365.25);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;if age &amp;lt; 12 then agegrp=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;else if 12 &amp;lt;= age &amp;lt; 20 then agegrp=2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;else if age &amp;gt;=20 then agegrp=3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: 'Times New Roman';"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 03:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120040#M33053</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-25T03:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: 2-way ANOVA question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120041#M33054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. This works. I am also opening the dataset along the way to be sure that everything is working correctly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 12:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/2-way-ANOVA-question/m-p/120041#M33054</guid>
      <dc:creator>SASstudent2013</dc:creator>
      <dc:date>2013-02-25T12:49:48Z</dc:date>
    </item>
  </channel>
</rss>

