<?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: ONE WAY MANOVA in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278551#M14705</link>
    <description>&lt;P&gt;The ERROR message in the log clearly states that the data contains missing values. The person who wrote this code did not write it to accomodate missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can conduct MANOVA analyses by using SAS procedures, such as GLM, which handle missing values. If you want to use this code, you can extract only the nonmissing&amp;nbsp;observations by foillowing the blog post&lt;A href="http://blogs.sas.com/content/iml/2015/02/23/complete-cases.html" target="_self"&gt; "Complete cases: How to perform listwise deletion in SAS."&lt;/A&gt;&amp;nbsp; For example, you might try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;start TREXA;
use TREXA;
read all var {height_change eno_change fev1_change} into x;

/* handle missing values. See
http://blogs.sas.com/content/iml/2015/02/23/complete-cases.html */
/* return rows that have no missing values */
start CompleteCases(X);
   return( loc(countmiss(X, "row")=0) );
finish;
/* exclude any row with a missing value */
start ExtractCompleteCases(X);
   idx = CompleteCases(X);
   if ncol(idx)&amp;gt;0 then
      return( X[idx, ] );
   else
      return( {} ); 
finish;
 
X = ExtractCompleteCases(X);  /* overwrite X with only complete cases */

/* ...continue program... */
n=nrow(x);
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 19 Jun 2016 22:39:38 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-06-19T22:39:38Z</dc:date>
    <item>
      <title>ONE WAY MANOVA with missing values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278546#M14704</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I'm stuck with the following problem-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QS-The CARE Network conducted a clinical trial called “&lt;STRONG&gt;TR&lt;/STRONG&gt;eating Children to Prevent &lt;STRONG&gt;EX&lt;/STRONG&gt;acerbations of &lt;STRONG&gt;A&lt;/STRONG&gt;sthma &lt;STRONG&gt;(&lt;/STRONG&gt;TREXA&lt;STRONG&gt;)&lt;/STRONG&gt;.” Examine the publication by Martinez et al (Lancet 2011) to get an overview of the study. The study design is a 2 ´ 2 factorial, and three outcome variables are provided (change in height, change in exhaled nitric oxide, and change in forced expiratory volume). Perform a MANOVA that includes checking normal assumptions, checking homogeneity of variance-covariance matrices, and providing appropriate confidence intervals for important effects&lt;/P&gt;
&lt;P&gt;dataset- Please see the attachment.&lt;/P&gt;
&lt;P&gt;Sas codes I ran and the error message I got are as follows-(Attachment)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data TREXA;&lt;/P&gt;
&lt;P&gt;set "TREXA.sas7bdat";&lt;/P&gt;
&lt;P&gt;label height_change='Change in Height (cm)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eno_change='Change in Exhaled Nitric Oxide (ppb)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fev1_change='Change in Forced Expiratory Volume (L/min)';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;Proc sort data=TREXA;&lt;/P&gt;
&lt;P&gt;by drug_arm ;run;&lt;/P&gt;
&lt;P&gt;proc univariate data=TREXA plots normal;&lt;/P&gt;
&lt;P&gt;by drug_arm;&lt;/P&gt;
&lt;P&gt;var height_change eno_change fev1_change;&lt;/P&gt;
&lt;P&gt;histogram height_change eno_change fev1_change;&lt;/P&gt;
&lt;P&gt;qqplot height_change eno_change fev1_change;&lt;/P&gt;
&lt;P&gt;title "TREXA";&lt;/P&gt;
&lt;P&gt;title2 'Histograms, Stem-and-Leaf Plots, Box Plots, and Q-Q Plots for Examining Marginal Distributions';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*one way manova-;&lt;/P&gt;
&lt;P&gt;proc iml;&lt;/P&gt;
&lt;P&gt;***********************************************************************&lt;/P&gt;
&lt;P&gt;* The intent of this program is to construct d_squared = one-half&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;* times the statistical distance of each observation vector from the&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;* mean vector.&amp;nbsp; If the observation vectors follow a p-variate normal&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;* distribution, then the d_squared values will follow a chi-square&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;* distribution with p degrees of freedom.&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;&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; *&lt;/P&gt;
&lt;P&gt;***********************************************************************;&lt;/P&gt;
&lt;P&gt;start TREXA;&lt;/P&gt;
&lt;P&gt;use TREXA;&lt;/P&gt;
&lt;P&gt;read all var {height_change eno_change fev1_change} into x;&lt;/P&gt;
&lt;P&gt;n=nrow(x);&lt;/P&gt;
&lt;P&gt;xbar_prime=x[+,]/n;&lt;/P&gt;
&lt;P&gt;deviations=x-(j(n,1,1)*xbar_prime);&lt;/P&gt;
&lt;P&gt;s=(1/(n-1))*deviations`*deviations;&lt;/P&gt;
&lt;P&gt;s_inverse=inv(s);&lt;/P&gt;
&lt;P&gt;d_squared=0.5*vecdiag(deviations*s_inverse*deviations`);&lt;/P&gt;
&lt;P&gt;create chisq_qqplot from d_squared [colname='d_squared'];&lt;/P&gt;
&lt;P&gt;append from d_squared;&lt;/P&gt;
&lt;P&gt;close chisq_qqplot;&lt;/P&gt;
&lt;P&gt;finish TREXA;&lt;/P&gt;
&lt;P&gt;run TREXA;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;error-&lt;/P&gt;
&lt;P&gt;999&amp;nbsp; proc iml;&lt;/P&gt;
&lt;P&gt;NOTE: IML Ready&lt;/P&gt;
&lt;P&gt;1000&lt;/P&gt;
&lt;P&gt;***********************************************************&lt;/P&gt;
&lt;P&gt;1000! ************&lt;/P&gt;
&lt;P&gt;1001&amp;nbsp; * The intent of this program is to construct d_squared =&lt;/P&gt;
&lt;P&gt;1001! one-half&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;1002&amp;nbsp; * times the statistical distance of each observation&lt;/P&gt;
&lt;P&gt;1002! vector from the&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;1003&amp;nbsp; * mean vector.&amp;nbsp; If the observation vectors follow a&lt;/P&gt;
&lt;P&gt;1003! p-variate normal&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;1004&amp;nbsp; * distribution, then the d_squared values will follow a&lt;/P&gt;
&lt;P&gt;1004! chi-square&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;1005&amp;nbsp; * distribution with p degrees of freedom.&lt;/P&gt;
&lt;P&gt;1005!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;1006&amp;nbsp; **********************************************************&lt;/P&gt;
&lt;P&gt;1006! *************;&lt;/P&gt;
&lt;P&gt;1007&amp;nbsp; start TREXA;&lt;/P&gt;
&lt;P&gt;1008&amp;nbsp; use TREXA;&lt;/P&gt;
&lt;P&gt;1009&amp;nbsp; read all var {height_change eno_change fev1_change} into x&lt;/P&gt;
&lt;P&gt;1009! ;&lt;/P&gt;
&lt;P&gt;1010&amp;nbsp; n=nrow(x);&lt;/P&gt;
&lt;P&gt;1011&amp;nbsp; xbar_prime=x[+,]/n;&lt;/P&gt;
&lt;P&gt;1012&amp;nbsp; deviations=x-(j(n,1,1)*xbar_prime);&lt;/P&gt;
&lt;P&gt;1013&amp;nbsp; s=(1/(n-1))*deviations`*deviations;&lt;/P&gt;
&lt;P&gt;1014&amp;nbsp; s_inverse=inv(s);&lt;/P&gt;
&lt;P&gt;1015&amp;nbsp; d_squared=0.5*vecdiag(deviations*s_inverse*deviations`);&lt;/P&gt;
&lt;P&gt;1016&amp;nbsp; create chisq_qqplot from d_squared [colname='d_squared'];&lt;/P&gt;
&lt;P&gt;1017&amp;nbsp; append from d_squared;&lt;/P&gt;
&lt;P&gt;1018&amp;nbsp; close chisq_qqplot;&lt;/P&gt;
&lt;P&gt;1019&amp;nbsp; finish TREXA;&lt;/P&gt;
&lt;P&gt;NOTE: Module TREXA defined.&lt;/P&gt;
&lt;P&gt;1020&amp;nbsp; run TREXA;&lt;/P&gt;
&lt;P&gt;ERROR: (execution) Invalid argument or operand; contains&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;operation : * at line 1013 column 24&lt;/P&gt;
&lt;P&gt;&amp;nbsp;operands&amp;nbsp; : _TEM1004, deviations&lt;/P&gt;
&lt;P&gt;_TEM1004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 rows&amp;nbsp;&amp;nbsp;&amp;nbsp; 288 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;
&lt;P&gt;deviations&amp;nbsp;&amp;nbsp;&amp;nbsp; 288 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;statement : ASSIGN at line 1013 column 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;traceback : module TREXA at line 1013 column 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Paused in module TREXA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can't figure out how to fix the problem.What to write in the "start" and 'Use' comment? Any help will be highly appreciated.Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ASR.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 12:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278546#M14704</guid>
      <dc:creator>ankitasroy</dc:creator>
      <dc:date>2016-06-20T12:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: ONE WAY MANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278551#M14705</link>
      <description>&lt;P&gt;The ERROR message in the log clearly states that the data contains missing values. The person who wrote this code did not write it to accomodate missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can conduct MANOVA analyses by using SAS procedures, such as GLM, which handle missing values. If you want to use this code, you can extract only the nonmissing&amp;nbsp;observations by foillowing the blog post&lt;A href="http://blogs.sas.com/content/iml/2015/02/23/complete-cases.html" target="_self"&gt; "Complete cases: How to perform listwise deletion in SAS."&lt;/A&gt;&amp;nbsp; For example, you might try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;start TREXA;
use TREXA;
read all var {height_change eno_change fev1_change} into x;

/* handle missing values. See
http://blogs.sas.com/content/iml/2015/02/23/complete-cases.html */
/* return rows that have no missing values */
start CompleteCases(X);
   return( loc(countmiss(X, "row")=0) );
finish;
/* exclude any row with a missing value */
start ExtractCompleteCases(X);
   idx = CompleteCases(X);
   if ncol(idx)&amp;gt;0 then
      return( X[idx, ] );
   else
      return( {} ); 
finish;
 
X = ExtractCompleteCases(X);  /* overwrite X with only complete cases */

/* ...continue program... */
n=nrow(x);
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jun 2016 22:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278551#M14705</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-19T22:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: ONE WAY MANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278719#M14713</link>
      <description>&lt;P&gt;If you do decide to analyze the data with a PROC rather than with IML, I highly recommend you read:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sastraining/2011/02/02/the-punchline-manova-or-a-mixed-model/" target="_blank"&gt;http://blogs.sas.com/content/sastraining/2011/02/02/the-punchline-manova-or-a-mixed-model/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you have missing values, you are much better off using PROC MIXED rather than using PROC GLM.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 15:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ONE-WAY-MANOVA-with-missing-values/m-p/278719#M14713</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2016-06-20T15:38:37Z</dc:date>
    </item>
  </channel>
</rss>

