I'm trying to output the duncan test from a glm, however I keep get a warning that MCLines wasn't created, despite me seeing the results available in the viewer. Data example: Compounds Concentration Matrix Days Recovery Purpose Compound1 100 M1 Day1 0.800 0.830 0.870 Day2 1.200 0.920 1.210 M2 Day1 1.310 0.970 1.000 Day2 0.970 1.040 1.020 M3 Day1 0.960 0.960 1.010 Day2 1.090 0.880 1.050 M4 Day1 0.980 1.050 1.040 Day2 1.000 0.990 1.020 500 M1 Day1 0.874 CCAlpha 0.940 CCAlpha 1.030 CCAlpha Day2 1.016 CCAlpha 1.194 CCAlpha 0.980 CCAlpha M2 Day1 1.316 CCAlpha 1.086 CCAlpha 1.230 CCAlpha Day2 1.016 CCAlpha 0.916 CCAlpha 1.296 CCAlpha M3 Day1 1.010 CCAlpha 0.850 CCAlpha 1.086 CCAlpha Day2 1.062 CCAlpha 0.938 CCAlpha 0.944 CCAlpha M4 Day1 1.034 CCAlpha 1.016 CCAlpha 1.014 CCAlpha Day2 1.060 CCAlpha 1.002 CCAlpha 0.852 CCAlpha 1000 M1 Day1 0.996 0.921 1.035 Day2 1.217 0.942 1.302 M2 Day1 1.149 1.098 1.106 Day2 1.030 0.955 1.004 M3 Day1 0.993 0.923 0.912 Day2 0.929 0.929 0.957 M4 Day1 1.056 1.001 1.073 Day2 0.994 1.055 0.906 SAS code (There's a reference to LOD Data, but it's for a separate calculation). PROC IMPORT OUT= SASUSER.IMPW_0001
DATAFILE= "P:\working\data.xlsx"
DBMS=EXCELCS REPLACE;
SHEET="'Data$'";
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
ods html body="&type proc varcomp with type I.html" path="desktop\SASOUTPUT" style=minimal;
option pagesize=90 linesize=90 formdlim='_';
ods trace on;
data sastx;
retain conc;
retain matr;
retain day;
retain compnd titletemp Purptemp file2open;
set SASUSER.IMPW_0001 /*(firstobs=2)*/;
if lengthn(compounds) gt 0 then compnd= compounds; else compounds= compnd;
if lengthn(Title) gt 0 then titletemp= Title;
if concentration gt 0 then conc= concentration; else concentration=conc;
if lengthn(matrix) gt 0 then matr= matrix; else matrix= matr;
if lengthn(days) gt 0 then day= days; else days= day;
if Recovery gt 0 then nobs+ 1;
if Recovery < 0 then Recovery = ' ';
if lengthn(Filename) gt 0 then file2open= Filename;
Keep concentration matrix days compounds Recovery nobs file2open Purpose Title;
run;
proc sql noprint;
select file2open
into :procfile
from Work.sastx;
%let procfile=P:\working\data.xlsx;
data CCAlphaCalc;
set sastx;
if Purpose = "CCAlpha" then output;
Keep concentration compounds Recovery Purpose Title;
run;
PROC IMPORT OUT= WORK.LODData
DATAFILE= "P:\working\data.xlsx"
DBMS=EXCELCS REPLACE;
SHEET="'LOD Data$'";
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
data CalcLOD;
retain compnd;
set WORK.LODData /*(firstobs=2)*/;
if lengthn(compounds) gt 0 then compnd= compounds; else compounds= compnd;
Keep compounds UnspikedConc SpikedConc ;
run;
proc sort data=CCAlphaCalc;
by compounds;
proc sort data=CalcLOD;
by compounds;
proc sort data=sastx;
by nobs;
proc sql noprint;
select Title
into :type
from Work.sastx;
%let type=&type;
Proc Means data=CalcLOD N Mean STD MIN Max;
var UnspikedConc SpikedConc;
by compounds;
TITLE " Simple Descriptive Statistics of LOD Data for &type";
ods output Summary = LODCompounds;
run;
Proc Means data=CCAlphaCalc N Mean STD MIN Max;
var Recovery concentration;
by compounds;
TITLE " Simple Descriptive Statistics of CCAlpha Data for &type";
ods output Summary = CCAlphaCompounds;
run;
proc print;
where nobs lt 21;
title "Analysis of &type by proc glm and varcomp with method=type I";
title2 " &type ";
proc sort data=sastx;
by compounds;
proc glm data=sastx;
by compounds;
class concentration matrix days;
model Recovery = concentration matrix(concentration) days(matrix concentration)/ss3;
test h=concentration e=matrix(concentration);
test h=matrix(concentration) e=days(matrix concentration);
lsmeans concentration matrix(concentration) days(matrix concentration)/stderr;
random concentration matrix(concentration) days(matrix concentration)/test;
means concentration matrix(concentration) days(matrix concentration)/duncan;
ods output LSMeans = LSMeanCompounds AltErrTests
= AltErrTestsCompounds OverallANOVA
= OverallANOVACompounds Means = MeansCompounds MCLines
= DuncanCompounds;
Data RSDCompounds;
Set MeansCompounds;
PercentRSDcompound = 100 * SD_Recovery /Mean_Recovery;
run;
proc sort data=sastx;
by compounds concentration;
ods select all;
ods show;
Data CalcValues;
Set sastx;
CalcValue = concentration * Recovery;
Conc2 = concentration**2;
W1 = 1/concentration;
w2 = 1/Conc2;
run; And what I get for output: NOTE: Analytical products:
SAS/STAT 15.1
SAS/ETS 15.1
SAS/IML 15.1
SAS/QC 15.1
NOTE: Additional host information:
X64_10PRO WIN 10.0.19041 Workstation
NOTE: SAS initialization used:
real time 2.28 seconds
cpu time 1.29 seconds
1 PROC IMPORT OUT= SASUSER.IMPW_0001
2 DATAFILE= "P:\working\data.xlsx"
3 DBMS=EXCELCS REPLACE;
4 SHEET="'Data$'";
5 SCANTEXT=YES;
6 USEDATE=YES;
7 SCANTIME=YES;
8 RUN;
NOTE: SASUSER.IMPW_0001 data set was successfully created.
NOTE: The data set SASUSER.IMPW_0001 has 14999 observations and 18 variables.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 1.43 seconds
cpu time 0.21 seconds
9
10
11 ods html body="&type proc varcomp with type I.html" path="desktop\SASOUTPUT" style=minimal;
WARNING: Apparent symbolic reference TYPE not resolved.
NOTE: Writing HTML Body file: &type proc varcomp with type I.html
ERROR: Physical file does not exist, P:\working\desktop\SASOUTPUT\&type proc varcomp with type I.html.
ERROR: No body file. HTML output will not be created.
12 option pagesize=90 linesize=90 formdlim='_';
13
14 ods trace on;
15
16
17
18 data sastx;
19 retain conc;
20 retain matr;
21 retain day;
22 retain compnd titletemp Purptemp file2open;
23
24
25 set SASUSER.IMPW_0001 /*(firstobs=2)*/;
26 if lengthn(compounds) gt 0 then compnd= compounds; else compounds= compnd;
27 if lengthn(Title) gt 0 then titletemp= Title;
28 if concentration gt 0 then conc= concentration; else concentration=conc;
29 if lengthn(matrix) gt 0 then matr= matrix; else matrix= matr;
30 if lengthn(days) gt 0 then day= days; else days= day;
31 if Recovery gt 0 then nobs+ 1;
32 if Recovery < 0 then Recovery = ' ';
33 if lengthn(Filename) gt 0 then file2open= Filename;
34 Keep concentration matrix days compounds Recovery nobs file2open Purpose Title;
35 run;
NOTE: Character values have been converted to numeric values at the places given by:
(Line):(Column).
32:34
NOTE: Variable Purptemp is uninitialized.
NOTE: There were 14999 observations read from the data set SASUSER.IMPW_0001.
NOTE: The data set WORK.SASTX has 14999 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
cpu time 0.03 seconds
36 proc sql noprint;
37 select file2open
38 into :procfile
39 from Work.sastx;
40 %let procfile=P:\working\data.xlsx;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
41 data CCAlphaCalc;
42 set sastx;
43 if Purpose = "CCAlpha" then output;
44 Keep concentration compounds Recovery Purpose Title;
45 run;
NOTE: There were 14999 observations read from the data set WORK.SASTX.
NOTE: The data set WORK.CCALPHACALC has 24 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
46 PROC IMPORT OUT= WORK.LODData
47 DATAFILE= "P:\working\data.xlsx"
48 DBMS=EXCELCS REPLACE;
49 SHEET="'LOD Data$'";
50 SCANTEXT=YES;
51 USEDATE=YES;
52 SCANTIME=YES;
53 RUN;
NOTE: WORK.LODDATA data set was successfully created.
NOTE: The data set WORK.LODDATA has 19999 observations and 8 variables.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.84 seconds
cpu time 0.07 seconds
54
55
56 data CalcLOD;
57 retain compnd;
58 set WORK.LODData /*(firstobs=2)*/;
59 if lengthn(compounds) gt 0 then compnd= compounds; else compounds= compnd;
60 Keep compounds UnspikedConc SpikedConc ;
61
62 run;
NOTE: There were 19999 observations read from the data set WORK.LODDATA.
NOTE: The data set WORK.CALCLOD has 19999 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
63 proc sort data=CCAlphaCalc;
64 by compounds;
NOTE: There were 24 observations read from the data set WORK.CCALPHACALC.
NOTE: The data set WORK.CCALPHACALC has 24 observations and 5 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
65 proc sort data=CalcLOD;
66 by compounds;
67
NOTE: There were 19999 observations read from the data set WORK.CALCLOD.
NOTE: The data set WORK.CALCLOD has 19999 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
68 proc sort data=sastx;
69 by nobs;
70
NOTE: There were 14999 observations read from the data set WORK.SASTX.
NOTE: The data set WORK.SASTX has 14999 observations and 9 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
71 proc sql noprint;
72 select Title
73 into :type
74 from Work.sastx;
75 %let type=&type;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
76 Proc Means data=CalcLOD N Mean STD MIN Max;
77 var UnspikedConc SpikedConc;
78 by compounds;
79 TITLE " Simple Descriptive Statistics of LOD Data for &type";
80 ods output Summary = LODCompounds;
NOTE: Writing HTML Body file: sashtml1.htm
81 run;
Output Added:
-------------
Name: Summary
Label: Summary statistics
Template: base.summary
Path: Means.ByGroup1.Summary
-------------
NOTE: The above message was for the following BY group:
Compounds=
NOTE: The data set WORK.LODCOMPOUNDS has 1 observations and 15 variables.
NOTE: There were 19999 observations read from the data set WORK.CALCLOD.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.36 seconds
cpu time 0.20 seconds
82 Proc Means data=CCAlphaCalc N Mean STD MIN Max;
83 var Recovery concentration;
84 by compounds;
85 TITLE " Simple Descriptive Statistics of CCAlpha Data for &type";
86 ods output Summary = CCAlphaCompounds;
87 run;
Output Added:
-------------
Name: Summary
Label: Summary statistics
Template: base.summary
Path: Means.ByGroup1.Summary
-------------
NOTE: The above message was for the following BY group:
Compounds=Compound1
NOTE: The data set WORK.CCALPHACOMPOUNDS has 1 observations and 15 variables.
NOTE: There were 24 observations read from the data set WORK.CCALPHACALC.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.04 seconds
cpu time 0.04 seconds
88 proc print;
89 where nobs lt 21;
ERROR: Variable nobs is not on file WORK.CCALPHACOMPOUNDS.
90
91 title "Analysis of &type by proc glm and varcomp with method=type I";
92 title2 " &type ";
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
93 proc sort data=sastx;
94 by compounds;
95
NOTE: There were 14999 observations read from the data set WORK.SASTX.
NOTE: The data set WORK.SASTX has 14999 observations and 9 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
96 proc glm data=sastx;
97 by compounds;
98 class concentration matrix days;
99 model Recovery = concentration matrix(concentration) days(matrix
99 ! concentration)/ss3;
100 test h=concentration e=matrix(concentration);
101 test h=matrix(concentration) e=days(matrix concentration);
102 lsmeans concentration matrix(concentration) days(matrix concentration)/stderr
102! ;
103 random concentration matrix(concentration) days(matrix concentration)/test;
104 means concentration matrix(concentration) days(matrix concentration)/duncan;
105 ods output LSMeans = LSMeanCompounds AltErrTests
106
107 = AltErrTestsCompounds OverallANOVA
108 = OverallANOVACompounds Means = MeansCompounds MCLines
109 = DuncanCompounds;
Output Added:
-------------
Name: ClassLevels
Label: Class Levels
Template: STAT.GLM.ClassLevels
Path: GLM.ByGroup1.Data.ClassLevels
-------------
Output Added:
-------------
Name: NObs
Label: Number of Observations
Template: STAT.GLM.NObsNotitle
Path: GLM.ByGroup1.Data.NObs
-------------
Output Added:
-------------
Name: OverallANOVA
Label: Overall ANOVA
Template: stat.GLM.OverallANOVA
Path: GLM.ByGroup1.ANOVA.Recovery.OverallANOVA
-------------
Output Added:
-------------
Name: FitStatistics
Label: Fit Statistics
Template: stat.GLM.FitStatistics
Path: GLM.ByGroup1.ANOVA.Recovery.FitStatistics
-------------
Output Added:
-------------
Name: ModelANOVA
Label: Type III Model ANOVA
Template: stat.GLM.Tests
Path: GLM.ByGroup1.ANOVA.Recovery.ModelANOVA
-------------
Output Added:
-------------
Name: AltErrTests
Label: Type III Tests with Error = Type III Matrix(Concentratio) SS
Template: stat.GLM.Tests
Path: GLM.ByGroup1.ANOVA.Recovery.AltErrTests
-------------
Output Added:
-------------
Name: AltErrTests
Label: Type III Tests with Error = Type III Days(Concent*Matrix) SS
Template: stat.GLM.Tests
Path: GLM.ByGroup1.ANOVA.Recovery.AltErrTests
-------------
Output Added:
-------------
Name: LSMeans
Label: LSMeans
Template: stat.GLM.LSMeans
Path: GLM.ByGroup1.LSMEANS.Concentration.Recovery.LSMeans
-------------
Output Added:
-------------
Name: MeanPlot
Label: Concentration Mean Plot
Template: Stat.GLM.Graphics.MeanPlot
Path: GLM.ByGroup1.LSMEANS.Concentration.Recovery.MeanPlot
-------------
Output Added:
-------------
Name: LSMeans
Label: LSMeans
Template: stat.GLM.LSMeans
Path: GLM.ByGroup1.LSMEANS.Matrix_Concentratio_.Recovery.LSMeans
-------------
Output Added:
-------------
Name: MeanPlot
Label: Matrix(Concentratio) Mean Plot
Template: Stat.GLM.Graphics.MeanPlot
Path: GLM.ByGroup1.LSMEANS.Matrix_Concentratio_.Recovery.MeanPlot
-------------
Output Added:
-------------
Name: LSMeans
Label: LSMeans
Template: stat.GLM.LSMeans
Path: GLM.ByGroup1.LSMEANS.Days_Concent_Matrix_.Recovery.LSMeans
-------------
Output Added:
-------------
Name: MeanPlot
Label: Days(Concent*Matrix) Mean Plot
Template: Stat.GLM.Graphics.MeanPlot
Path: GLM.ByGroup1.LSMEANS.Days_Concent_Matrix_.Recovery.MeanPlot
-------------
Output Added:
-------------
Name: ExpectedMeanSquares
Label: Model Expected Mean Squares
Template: Stat.GLM.ExpectedMeanSquares
Path: GLM.ByGroup1.Random.ExpectedMeanSquares
-------------
Output Added:
-------------
Name: RandomModelANOVA
Label: Type III Model ANOVA
Template: STAT.GLM.RTests
Path: GLM.ByGroup1.Random.Recovery.RandomModelANOVA
-------------
Output Added:
-------------
Name: RandomModelANOVA
Label: Type III Model ANOVA
Template: STAT.GLM.RTests
Path: GLM.ByGroup1.Random.Recovery.RandomModelANOVA
-------------
Output Added:
-------------
Name: RandomModelANOVA
Label: Type III Model ANOVA
Template: STAT.GLM.RTests
Path: GLM.ByGroup1.Random.Recovery.RandomModelANOVA
-------------
NOTE: Means from the MEANS statement are not adjusted for other terms in the model. For
adjusted means, use the LSMEANS statement.
Output Added:
-------------
Name: BoxPlot
Label: Distribution of Recovery by Concentration
Template: Stat.GLM.Graphics.MeansBoxPlot
Path: GLM.ByGroup1.Means.Concentration.Recovery.BoxPlot
-------------
Output Added:
-------------
Name: MCLinesInfo
Label: Information
Template: stat.GLM.SquashFact
Path: GLM.ByGroup1.Means.Concentration.Recovery.MCLines.Duncan.MCLinesInfo
-------------
Output Added:
-------------
Name: MCLinesRange
Label: Critical Ranges
Template: stat.GLM.Range
Path: GLM.ByGroup1.Means.Concentration.Recovery.MCLines.Duncan.MCLinesRange
-------------
Output Added:
-------------
Name: LinesPlot
Template: Stat.GLM.Graphics.MeanLinesPlot
Path: GLM.ByGroup1.Means.Concentration.Recovery.MCLines.Duncan.LinesPlot
-------------
Output Added:
-------------
Name: BoxPlot
Label: Distribution of Recovery by Matrix(Concentratio)
Template: Stat.GLM.Graphics.MeansBoxPlot
Path: GLM.ByGroup1.Means.Matrix_Concentratio_.Recovery.BoxPlot
-------------
Output Added:
-------------
Name: Means
Label: Means
Template: stat.GLM.Means
Path: GLM.ByGroup1.Means.Matrix_Concentratio_.Means
-------------
Output Added:
-------------
Name: BoxPlot
Label: Distribution of Recovery by Days(Concent*Matrix)
Template: Stat.GLM.Graphics.MeansBoxPlot
Path: GLM.ByGroup1.Means.Days_Concent_Matrix_.Recovery.BoxPlot
-------------
Output Added:
-------------
Name: Means
Label: Means
Template: stat.GLM.Means
Path: GLM.ByGroup1.Means.Days_Concent_Matrix_.Means
-------------
NOTE: The above message was for the following BY group:
Compounds=Compound1
NOTE: The data set WORK.MEANSCOMPOUNDS has 36 observations and 8 variables.
NOTE: The data set WORK.OVERALLANOVACOMPOUNDS has 3 observations and 8 variables.
NOTE: The data set WORK.ALTERRTESTSCOMPOUNDS has 2 observations and 11 variables.
NOTE: The data set WORK.LSMEANCOMPOUNDS has 39 observations and 9 variables.
WARNING: Output 'MCLines' was not created. Make sure that the output object name, label,
or path is spelled correctly. Also, verify that the appropriate procedure
options are used to produce the requested output object. For example, verify
that the NOPRINT option is not used.
NOTE: PROCEDURE GLM used (Total process time):
real time 2.02 seconds
cpu time 0.89 seconds
110 Data RSDCompounds;
111
112 Set MeansCompounds;
113 PercentRSDcompound = 100 * SD_Recovery /Mean_Recovery;
114 run;
NOTE: There were 36 observations read from the data set WORK.MEANSCOMPOUNDS.
NOTE: The data set WORK.RSDCOMPOUNDS has 36 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
115 proc sort data=sastx;
116 by compounds concentration;
117 ods select all;
118 ods show;
Current OVERALL select list is: ALL
NOTE: There were 14999 observations read from the data set WORK.SASTX.
NOTE: The data set WORK.SASTX has 14999 observations and 9 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
119 Data CalcValues;
120 Set sastx;
121 CalcValue = concentration * Recovery;
122 Conc2 = concentration**2;
123 W1 = 1/concentration;
124 w2 = 1/Conc2;
125 run;
NOTE: Missing values were generated as a result of performing an operation on missing
values.
Each place is given by: (Number of times) at (Line):(Column).
14927 at 121:31
NOTE: There were 14999 observations read from the data set WORK.SASTX.
NOTE: The data set WORK.CALCVALUES has 14999 observations and 13 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds The concerning error is: WARNING: Output 'MCLines' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used. I've checked other data, and it all seems to be the same issue, but I can't figure out how to have the duncan test show as a work table.
... View more