<?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 code to analyse data set with 2 independent variables and multiples dependent variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535656#M26969</link>
    <description>&lt;P&gt;Thanks a lot Reeza!&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2019 17:42:24 GMT</pubDate>
    <dc:creator>MarinaBA</dc:creator>
    <dc:date>2019-02-14T17:42:24Z</dc:date>
    <item>
      <title>How do I code to analyse data set with 2 independent variables and multiples dependent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535642#M26966</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am a beginner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My 2 independent variables are Cultivar and Block.&lt;/P&gt;&lt;P&gt;And then, I have multiple responses, 10 to be precise. Our responses are basically yield in the shape of fruit count and aggregate weight. The count and the weight was separated in 5 market categories: small, med, large, xlarge, and culls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I would like to test if block and/or cultivar had any effect on yield (given the 5 market categories, and within each market category we have fruit count and weight)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;data file attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS 9.4&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 16:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535642#M26966</guid>
      <dc:creator>MarinaBA</dc:creator>
      <dc:date>2019-02-14T16:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I code to analyse data set with 2 independent variables and multiples dependent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535647#M26967</link>
      <description>&lt;P&gt;See attached the code I have so far&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 16:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535647#M26967</guid>
      <dc:creator>MarinaBA</dc:creator>
      <dc:date>2019-02-14T16:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I code to analyse data set with 2 independent variables and multiples dependent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535650#M26968</link>
      <description>&lt;P&gt;Welcome to the SAS forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that I've moved your post to the SAS/STATs forum instead, so hopefully, that gets you better responses.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does help if you post your code and data directly into your posts, rather than attachments.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you try and copy the code from a word document it doesn't always flow correctly, I get a wall of text instead of indented code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the code inserted below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dm 'log; clear; output; clear; odsresults; clear';
options nocenter ls=90 ps=80 pageno=1;

Data fall2018;
	input block cultivar$ SCount SWeight MCount MWeight LCount LWeight XCount XWeight CCount CWeight;
	datalines;

1	BHN589	0	0	15	3.9	30	10.65	46	25.54	25	7
2	BHN589	11	2.15	7	1.7	12	3.75	39	18.14	24	6.6
3	BHN589	9	1.85	10	2.8	23	7.55	39	18.94	15	2.8
1	Charger	13	2.6	9	2.2	33	10.5	51	26.78	28	6.75
2	Charger	13	2.4	20	5.1	22	7.25	33	16.91	26	7.8
3	Charger	10	1.8	26	6.4	18	6.05	51	25.55	11	3.24
1	GrandMarshall	7	1.3	13	3.25	37	12.3	40	21.52	13	4.84
2	GrandMarshall	10	1.7	19	4.2	29	9.6	54	27.6	15	4.3
3	GrandMarshall	14	2.5	16	4	23	7.5	32	13.35	9	1.95
1	Marnero	4	0.7	9	2.5	21	6.97	47	28.41	26	11.51
2	Marnero	2	0.3	4	0.89	30	9.05	53	27.08	33	14.54
3	Marnero	10	1.65	9	2.06	12	3.51	65	35.48	36	17.41
1	Rebelski	10	1.85	34	8.29	40	12.5	43	18.96	49	16.98
2	Rebelski	9	1.55	15	3.75	23	7	15	5.45	56	22.2
3	Rebelski	13	2.15	24	5.4	29	8.55	28	12.35	88	30.1

;
run;

proc print data=fall2018;
	title2 'Organic Plots_raw data';

proc means data=fall2018 maxdec=2 n mean std;
	title2 'Summary Statistics by Treatment (cultivar)';
	by cultivar;
	var SCount SWeight MCount MWeight LCount LWeight XCount XWeight CCount CWeight;

proc means data=fall2018 mean stderr lclm uclm;
	class cultivar;
	var SCount;
	output out= fall20181 mean=mean lclm=lcl 
		uclm=ucl stderr=ses;
run;

proc sgplot data=fall20181;
	title3 "Error Bars for Cultivar";
	vbarparm category=cultivar response=mean /
		limitlower=lcl limitupper=ucl barwidth=.6;
run;

proc means data=fall2018 mean stderr lclm uclm;
	class cultivar;
	var SWeight;
	output out= fall20182 mean=mean lclm=lcl 
		uclm=ucl stderr=ses;
run;

/*how to plot both Scount and Sweight in oneplot? */
proc sgplot data=fall20182;
	title4 "Error Bars for Cultivar";
	vbarparm category=cultivar response=mean /
		limitlower=lcl limitupper=ucl barwidth=.6;
run;

PROC GLM data=fall2018;
	CLASS cultivar;
	MODEL Scount = cultivar;

proc glimmix data=fall2018 plots=(residualpanel 
		studentpanel boxplot(observed));
	class block cultivar;
	model SCount = cultivar / dist=normal 
		link=identity ddfm=kr;
	random block;
	lsmeans cultivar / cl lines 
		adjust=tukey;
	output out=fall2018out pred=pred student=student 
		lcl=lower ucl=upper;
run;

proc univariate data=fall2018out normal;
	var student;
	histogram / normal;
	qqplot / normal(mu=est sigma=est);
run;&lt;/PRE&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;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 17:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535650#M26968</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-14T17:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I code to analyse data set with 2 independent variables and multiples dependent variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535656#M26969</link>
      <description>&lt;P&gt;Thanks a lot Reeza!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 17:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-code-to-analyse-data-set-with-2-independent-variables/m-p/535656#M26969</guid>
      <dc:creator>MarinaBA</dc:creator>
      <dc:date>2019-02-14T17:42:24Z</dc:date>
    </item>
  </channel>
</rss>

