BookmarkSubscribeRSS Feed
Nyac122
New User | Level 1

i am trying to recode my district variables so i can use proc reg and its not working .

WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed

data flgrads;
input districts $ 1-9 year $ 10-20 percentage;
datalines;
alachua 2016-2017 82.7
alachua 2017-2018 88
alachua 2018-2019 88.5
alachua 2019-2020 90.4
alachua 2020-2021 86.6
baker 2016-2017 81
baker 2017-2018 75.5
baker 2018-2019 78.8
baker 2019-2020 84.5
baker 2020-2021 85.7
bay 2016-2017 78.0
bay 2017-2018 81.1
bay 2018-2019 82.5
bay 2019-2020 88.5
bay 2020-2021 90.2
bradford 2016-2017 78.9
bradford 2017-2018 89
bradford 2018-2019 87.7
bradford 2019-2020 98.2
bradford 2020-2021 85
brevard 2016-2017 85.9
brevard 2017-2018 88.1
brevard 2018-2019 88.3
brevard 2019-2020 90.3
brevard 2020-2021 90.6
broward 2016-2017 81
broward 2017-2018 84.3
broward 2018-2019 86.2
broward 2019-2020 89.4
broward 2020-2021 89.1
calhoun 2016-2017 80.9
calhoun 2017-2018 86.9
calhoun 2018-2019 87.9
calhoun 2019-2020 89.9
calhoun 2020-2021 93.1
Charlotte 2016-2017 81.0
Charlotte 2017-2018 87.6
Charlotte 2018-2019 86.4
Charlotte 2019-2020 90.4
Charlotte 2020-2021 90.9
Citrus 2016-2017 78.9
Citrus 2017-2018 84.1
Citrus 2018-2019 86.0
Citrus 2019-2020 87.1
Citrus 2020-2021 88.1
Clay 2016-2017 88.4
Clay 2017-2018 91.1
Clay 2018-2019 91.9
Clay 2019-2020 93.4
Clay 2020-2021 92.7
Collier 2016-2017 88.2
Collier 2017-2018 91.9
Collier 2018-2019 91.9
Collier 2019-2020 92.2
Collier 2020-2021 92.7
Columbia 2016-2017 70.7
Columbia 2017-2018 88.4
Columbia 2018-2019 92.4
Columbia 2019-2020 95.4
Columbia 2020-2021 95.6
MiamiDade 2016-2017 80.7
MiamiDade 2017-2018 85.4
MiamiDade 2018-2019 85.6
MiamiDade 2019-2020 89.6
MiamiDade 2020-2021 90.1
DeSoto 2016-2017 63.8
DeSoto 2017-2018 60.9
DeSoto 2018-2019 71.3
DeSoto 2019-2020 84.6
DeSoto 2020-2021 82
Dixie 2016-2017 89.5
Dixie 2017-2018 96.9
Dixie 2018-2019 90.6
Dixie 2019-2020 89.8
Dixie 2020-2021 84
Duval 2016-2017 80.8
Duval 2017-2018 85.1
Duval 2018-2019 86.5
Duval 2019-2020 90.2
Duval 2020-2021 89.6
;
proc print;
run;
data flgrads2;
set flgrads;
Alachua= (district= 0);
Baker= (districts= 1);
Bay = (districts= 2);
Bradford= (districts= 3);
Brevard= (districts= 4);
Broward= (districts= 5);
Calhoun= (districts= 6);
Charlotte= (districts= 7);
Citrus= (districts= 8);
Clay= (districts= 9);
Collier= (districts= 10);
Columbia= (districts= 11);
MiamiDade= (districts= 12);
DeSoto= (districts= 13);
Dixie= (districts= 14);
Duval= (districts= 15);
run;

0 Likes
1 REPLY 1
Astounding
Opal | Level 21
Have you examined the log and the output of the program you posted? It creates a character variable DISTRICTS that does not take on numeric values like 1, 2, and 3. Yet your second DATA step seems to expect those values. So it is impossible to determine what data you have, and what result you would like. Perhaps you need statements that look more like:

bay = (districts = "bay");

That statement would at least match the sample data you posted.
0 Likes
JUST RELEASED

SAS Viya with pay-as-you-go pricing.

Deploy software automatically at the click of a button on the Microsoft Azure Marketplace.

Learn more

55 percent discount.jpg

Recommended by SAS
These recommendations are generated using AI from SAS. For personalized recommendations, sign in with your SAS profile.
Discussion stats
  • 1 reply
  • 71 views
  • 0 likes
  • 2 in conversation