<?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 times ods exclude where giving error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/2-times-ods-exclude-where-giving-error/m-p/776577#M247014</link>
    <description>&lt;P&gt;the first time used before proc glm works.&lt;/P&gt;
&lt;P&gt;the second time has no effect at all.&lt;/P&gt;
&lt;P&gt;why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ODS PDF FILE="/caslibs/risknb/_covid on RV.pdf"
nogtitle nogfootnote STYLE=SASWEB DPI=300;

ods exclude where=^(_name_ in ("ParameterEstimates" "NObs" "Estimates" ));

title "Covid effect on RV by year";
proc glm data=&amp;amp;ds.5 plots=all noprint;
where (^outlier)*(fuel_type not in ('Hybrid Diesel' '')) *(_gama_fuel in (&amp;amp;mods)) *(CONTROL_YEAR NE '');
/* *(_gama_fuel in ('A1*Diesel' 'A1*Petrol')); */
/* format RMDFECHAVENTA yyq6.; */
class _gama_fuel  CONTROL_YEAR fuel_type _brand;
model sales_res = _gama_fuel  CONTROL_YEAR actual_mileage  _brand*meses_efectivos
_brand*meses_efectivos*meses_efectivos _brand*fuel_type*actual_mileage / solution e ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (12 30000) obsmargins out=risknoba._12lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (24 60000) obsmargins out=risknoba._24lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (36 90000) obsmargins out=risknoba._36lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (48 120000) obsmargins out=risknoba._48lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (60 150000) obsmargins out=risknoba._60lsmeans  ;
estimate 'global difference same for all terms'
              control_year -1 1;
store work.covid_glm;
run;

ods exclude none;

data risknoba.all_covid;
set RISKNOBA._12LSMEANS RISKNOBA._24LSMEANS RISKNOBA._36LSMEANS RISKNOBA._48LSMEANS RISKNOBA._60LSMEANS indsname=sourcy;
report_orig=SCAN(sourcy,2,'.');
format RMDFECHAVENTA yyq6.;
months=input(substr(report_orig,2,2),3.);
kms=months*30000/12;
qtr_year=put(RMDFECHAVENTA, yyq6.);
run;


proc cas ;
  table.save /
    table={name="ALL_COVID", caslib="risknoba"} compress=false replace=true
    name="Covid effect on RV by year.xlsx" caslib="risknoba"
    exportOptions={                                               
        fileType="auto"
    };
run;


ods exclude where=^(_name_ in ("ParameterEstimates" "NObs" "Estimates" ));

title "Covid effect on RV by year and by brand";
proc glm data=&amp;amp;ds.5 plots=all noprint;
where (^outlier)*(fuel_type not in ('Hybrid Diesel' '')) *(_gama_fuel in (&amp;amp;mods)) *(CONTROL_YEAR NE '');
/* *(_gama_fuel in ('A1*Diesel' 'A1*Petrol')); */
by _brand;
/* format RMDFECHAVENTA yyq6.; */
class _gama_fuel  CONTROL_YEAR fuel_type _brand;
model sales_res = _gama_fuel  CONTROL_YEAR actual_mileage  _brand*meses_efectivos
_brand*meses_efectivos*meses_efectivos _brand*fuel_type*actual_mileage / solution e ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (12 30000) obsmargins out=risknoba._12lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (24 60000) obsmargins out=risknoba._24lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (36 90000) obsmargins out=risknoba._36lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (48 120000) obsmargins out=risknoba._48lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (60 150000) obsmargins out=risknoba._60lsmeans  ;
estimate 'brand specific difference same for all terms'
              control_year -1 1;
store work.covid_glm;
run;

ods exclude none;
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 26 Oct 2021 18:34:31 GMT</pubDate>
    <dc:creator>acordes</dc:creator>
    <dc:date>2021-10-26T18:34:31Z</dc:date>
    <item>
      <title>2 times ods exclude where giving error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-times-ods-exclude-where-giving-error/m-p/776577#M247014</link>
      <description>&lt;P&gt;the first time used before proc glm works.&lt;/P&gt;
&lt;P&gt;the second time has no effect at all.&lt;/P&gt;
&lt;P&gt;why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ODS PDF FILE="/caslibs/risknb/_covid on RV.pdf"
nogtitle nogfootnote STYLE=SASWEB DPI=300;

ods exclude where=^(_name_ in ("ParameterEstimates" "NObs" "Estimates" ));

title "Covid effect on RV by year";
proc glm data=&amp;amp;ds.5 plots=all noprint;
where (^outlier)*(fuel_type not in ('Hybrid Diesel' '')) *(_gama_fuel in (&amp;amp;mods)) *(CONTROL_YEAR NE '');
/* *(_gama_fuel in ('A1*Diesel' 'A1*Petrol')); */
/* format RMDFECHAVENTA yyq6.; */
class _gama_fuel  CONTROL_YEAR fuel_type _brand;
model sales_res = _gama_fuel  CONTROL_YEAR actual_mileage  _brand*meses_efectivos
_brand*meses_efectivos*meses_efectivos _brand*fuel_type*actual_mileage / solution e ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (12 30000) obsmargins out=risknoba._12lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (24 60000) obsmargins out=risknoba._24lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (36 90000) obsmargins out=risknoba._36lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (48 120000) obsmargins out=risknoba._48lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (60 150000) obsmargins out=risknoba._60lsmeans  ;
estimate 'global difference same for all terms'
              control_year -1 1;
store work.covid_glm;
run;

ods exclude none;

data risknoba.all_covid;
set RISKNOBA._12LSMEANS RISKNOBA._24LSMEANS RISKNOBA._36LSMEANS RISKNOBA._48LSMEANS RISKNOBA._60LSMEANS indsname=sourcy;
report_orig=SCAN(sourcy,2,'.');
format RMDFECHAVENTA yyq6.;
months=input(substr(report_orig,2,2),3.);
kms=months*30000/12;
qtr_year=put(RMDFECHAVENTA, yyq6.);
run;


proc cas ;
  table.save /
    table={name="ALL_COVID", caslib="risknoba"} compress=false replace=true
    name="Covid effect on RV by year.xlsx" caslib="risknoba"
    exportOptions={                                               
        fileType="auto"
    };
run;


ods exclude where=^(_name_ in ("ParameterEstimates" "NObs" "Estimates" ));

title "Covid effect on RV by year and by brand";
proc glm data=&amp;amp;ds.5 plots=all noprint;
where (^outlier)*(fuel_type not in ('Hybrid Diesel' '')) *(_gama_fuel in (&amp;amp;mods)) *(CONTROL_YEAR NE '');
/* *(_gama_fuel in ('A1*Diesel' 'A1*Petrol')); */
by _brand;
/* format RMDFECHAVENTA yyq6.; */
class _gama_fuel  CONTROL_YEAR fuel_type _brand;
model sales_res = _gama_fuel  CONTROL_YEAR actual_mileage  _brand*meses_efectivos
_brand*meses_efectivos*meses_efectivos _brand*fuel_type*actual_mileage / solution e ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (12 30000) obsmargins out=risknoba._12lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (24 60000) obsmargins out=risknoba._24lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (36 90000) obsmargins out=risknoba._36lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (48 120000) obsmargins out=risknoba._48lsmeans  ;
LSMEANS CONTROL_YEAR / E AT (MESES_EFECTIVOS ACTUAL_MILEAGE) = (60 150000) obsmargins out=risknoba._60lsmeans  ;
estimate 'brand specific difference same for all terms'
              control_year -1 1;
store work.covid_glm;
run;

ods exclude none;
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Oct 2021 18:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-times-ods-exclude-where-giving-error/m-p/776577#M247014</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2021-10-26T18:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: 2 times ods exclude where giving error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/2-times-ods-exclude-where-giving-error/m-p/776649#M247038</link>
      <description>&lt;P&gt;A question for tech support I reckon.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 01:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/2-times-ods-exclude-where-giving-error/m-p/776649#M247038</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-27T01:47:51Z</dc:date>
    </item>
  </channel>
</rss>

