BookmarkSubscribeRSS Feed
Afham
Fluorite | Level 6
data generalburndown;
input Trt$ rep$ seven fourteen twentyeight fiftysix;
datalines;
1 1 3.24 0.71 0.71 0.71
1 2 3.24 0.71 0.71 0.71
1 3 3.24 0.71 0.71 0.71
1 4 3.24 0.71 0.71 0.71
2 1 3.24 3.24 0.71 0.71
2 2 3.24 3.24 0.71 0.71
2 3 3.24 3.24 0.71 0.71
2 4 3.24 3.24 0.71 0.71
3 1 3.24 3.24 0.71 0.71
3 2 3.24 3.24 0.71 0.71
3 3 3.24 3.24 0.71 0.71
3 4 3.24 3.24 0.71 0.71
4 1 3.24 3.24 0.71 0.71
4 2 3.24 3.24 0.71 0.71
4 3 3.24 3.24 0.71 0.71
4 4 3.24 3.24 0.71 0.71
5 1 9.58 9.71 8.09 0.71
5 2 9.25 9.58 3.94 0.71
5 3 9.58 9.51 8.97 0.71
5 4 9.71 9.04 6.36 0.71
6 1 8.54 8.69 0.71 0.71
6 2 8.25 7.62 0.71 0.71
6 3 9.04 7.94 0.71 0.71
6 4 9.64 7.28 0.71 0.71
7 1 9.51 8.83 4.53 0.71
7 2 9.64 9.25 8.09 0.71
7 3 9.11 8.54 4.53 0.71
7 4 9.38 8.40 4.24 0.71
8 1 9.45 5.52 8.40 0.71
8 2 9.51 4.53 4.80 0.71
8 3 9.25 6.93 4.53 0.71
8 4 9.31 5.96 5.52 0.71
9 1 8.54 2.35 5.52 0.71
9 2 6.36 2.83 2.35 0.71
9 3 8.09 0.71 0.71 0.71
9 4 8.09 5.05 0.71 0.71
10 1 8.09 8.25 0.71 0.71
10 2 9.38 6.36 0.71 0.71
10 3 9.11 8.69 0.71 0.71
10 4 8.97 7.11 0.71 0.71
11 1 9.77 8.09 8.83 0.71
11 2 9.38 7.94 6.93 0.71
11 3 9.58 8.54 6.36 0.71
11 4 9.64 8.69 5.05 0.71
12 1 3.24 9.31 0.71 0.71
12 2 5.05 9.25 3.24 0.71
12 3 3.94 9.51 3.24 0.71
12 4 3.24 9.18 3.24 0.71
13 1 0.71 0.71 0.71 0.71
13 2 0.71 0.71 0.71 0.71
13 3 0.71 0.71 0.71 0.71
13 4 0.71 0.71 0.71 0.71
;
proc means stderr;
var seven fourteen twentyeight fiftysix;
class Trt;
run;
proc anova;
class Trt rep;
model seven fourteen twentyeight fiftysix=Trt rep;
means Trt rep/lsd tukey;
run;
10 REPLIES 10
Afham
Fluorite | Level 6
ous sorry, heres the log


1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 data generalburndown;
74 input Trt$ rep$ seven fourteen twentyeight fiftysix;
75 datalines;

NOTE: Invalid data for seven in line 78 1-23.
NOTE: Invalid data for fourteen in line 79 1-23.
NOTE: Invalid data for twentyeight in line 80 1-23.
NOTE: Invalid data for fiftysix in line 81 1-23.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0

81 CHAR 2.2.3.24.3.24.0.71.0.71
ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 29293E2493E2490E7190E71000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=113.24 rep=123.24 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=1
NOTE: Invalid data for seven in line 84 1-23.
NOTE: Invalid data for fourteen in line 85 1-23.
NOTE: Invalid data for twentyeight in line 86 1-23.
NOTE: Invalid data for fiftysix in line 87 1-23.

87 CHAR 3.4.3.24.3.24.0.71.0.71
ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 39493E2493E2490E7190E71000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=233.24 rep=243.24 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=2
NOTE: Invalid data for seven in line 90 1-23.
NOTE: Invalid data for fourteen in line 91 1-23.
NOTE: Invalid data for twentyeight in line 92 1-23.
NOTE: Invalid data for fiftysix in line 93 1-23.

93 CHAR 5.2.9.25.9.58.3.94.0.71
ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 59299E2599E5893E9490E71000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=413.24 rep=423.24 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=3
NOTE: Invalid data for seven in line 96 1-23.
NOTE: Invalid data for fourteen in line 97 1-23.
NOTE: Invalid data for twentyeight in line 98 1-23.
NOTE: Invalid data for fiftysix in line 99 1-23.

99 CHAR 6.4.9.64.7.28.0.71.0.71
ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 69499E6497E2890E7190E71000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=539.58 rep=549.71 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=4
NOTE: Invalid data for seven in line 102 1-23.
NOTE: Invalid data for fourteen in line 103 1-23.
NOTE: Invalid data for twentyeight in line 104 1-23.
NOTE: Invalid data for fiftysix in line 105 1-23.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0

105 CHAR 8.2.9.51.4.53.4.80.0.71
ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 89299E5194E5394E8090E71000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=719.51 rep=729.64 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=5
NOTE: Invalid data for seven in line 108 1-23.
NOTE: Invalid data for fourteen in line 109 1-23.
NOTE: Invalid data for twentyeight in line 110 1-23.
NOTE: Invalid data for fiftysix in line 111 1-23.

111 CHAR 9.4.8.09.5.05.0.71.0.71
ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 99498E0995E0590E7190E71000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=839.25 rep=849.31 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=6
NOTE: Invalid data for seven in line 114 1-24.
NOTE: Invalid data for fourteen in line 115 1-24.
NOTE: Invalid data for twentyeight in line 116 1-24.
NOTE: Invalid data for fiftysix in line 117 1-24.

117 CHAR 11.2.9.38.7.94.6.93.0.71
ZONE 33030323303233032330323322222222222222222222222222222222222222222222222222222222
NUMR 119299E3897E9496E9390E7100000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=1018.0 rep=1029.3 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=7
NOTE: Invalid data for seven in line 120 1-24.
NOTE: Invalid data for fourteen in line 121 1-24.
NOTE: Invalid data for twentyeight in line 122 1-24.
NOTE: Invalid data for fiftysix in line 123 1-24.

123 CHAR 12.4.3.24.9.18.3.24.0.71
ZONE 33030323303233032330323322222222222222222222222222222222222222222222222222222222
NUMR 129493E2499E1893E2490E7100000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=1139.5 rep=1149.6 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=8
NOTE: Invalid data for seven in line 126 1-24.
NOTE: Invalid data for fourteen in line 127 1-24.
NOTE: LOST CARD.
128 ;
NOTE: Invalid data errors for file CARDS occurred outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Trt=1310.7 rep=1320.7 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=9
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.GENERALBURNDOWN has 8 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds


128 ;
129 proc means stderr;
130 var seven fourteen twentyeight fiftysix;
131 class Trt;
132 run;

NOTE: There were 8 observations read from the data set WORK.GENERALBURNDOWN.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.44 seconds
cpu time 0.42 seconds


133 proc anova;
134 class Trt rep;
135 model seven fourteen twentyeight fiftysix=Trt rep;
136 means Trt rep/lsd tukey;
137 run;

ERROR: One or more variables are missing or freq or weight is zero on every observation.
138
139 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
151
ballardw
Super User

Every single one of those "invalid data" messages means one or more variables are missing.

Get enough of those and you don't have complete records to model from

Fix your read program.

A large economy sized clue appears in this:

Trt=113.24 rep=123.24 seven=. fourteen=. twentyeight=. fiftysix=. _ERROR_=1 _N_=1

The _N_=1 tells you the problem occurred with the first iteration of the data step, so check you data lines closely

ZONE 30303233032330323303233222222222222222222222222222222222222222222222222222222222
NUMR 29293E2493E2490E7190E71000000000000000000000000000000000000000000000000000000000

And those 09 highlighted above tells me that your data you are reading is extremely likely to be TAB delimited.

Which would mean that you need

INFILE datalines dlm='09'x;

 

 

 

ChrisNZ
Tourmaline | Level 20

That's one dirty log.

1. Always look at the log and fix the data until the log is squeaky clean

2. Always look at the data. Why wouldn't you check that it looks clean?

 

 

 

 

 

 

 

 

 

Afham
Fluorite | Level 6

@ChrisNZ  ouh, sorry.. i'm new here.. how do i show the error log? i cannot paste the log here.

 
ChrisNZ
Tourmaline | Level 20

Hi @Afham 

Welcome!

Of course you can paste the log, it is just text.

Use the </> icon so it is formatted properly.

ballardw
Super User

That data set does not create any error or warnings in the log. So how representative of your actual data is it?

 

A style point to address, while SAS does not require you to state the name of the data set to use for input and will use the last created data set it is highly recommended to always specifically name the data set you intend to use with the Data= option.

That way there is never a question as to exactly which input set is used.

 

Consider: you run a regression and ask for an output parameters data set. Then realize you missed one of the options you intended to request. If you add the option but do not have the Data= input set specified the regression will use the just created output parameter set for the input. A different input data set is quite often going to generate one or more problems, at a minimum quite unexpected output if not actual errors.

 

Second, Proc Anova is one of the "interactive" procedures that allows multiple "run;" statements. You want to end it with a Quit; statement.

Kurt_Bremser
Super User

Your code as posted does indeed create the ERROR, because you have tabs in the datalines, and that causes the INPUT statement to skip over lines and set all variables from the 3rd to missing. Maxim 3: Read the Log.

Adding a matching INFILE statement:

infile datalines dlm='09'x dsd truncover;

created the dataset correctly, and PROC ANOVA ran without ERRORs.

Afham
Fluorite | Level 6

thank you @ChrisNZ  @Kurt_Bremser  and @ballardw  for your response. i try to run my code on my friends computer and it run without any problem. it seems that my sas edition or my computer is broken because i just copy and paste the same command in his computer and get the result without problem. sorry for all the inconvenient.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 1181 views
  • 5 likes
  • 4 in conversation