BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KRHE
Obsidian | Level 7

Hi,

I am having issues with doing a regression since my dep var is string. I've recoded the variable but it won't intergrate into my regression.

Everything is successful but I think that my format and my data do not connect. Perhaps since they are on different paths?

 

libname x xlsx 'C:\Users\BF3513\Desktop\DATA\info1.xls';
run;


proc contents data=info1;
run;

 

proc format library=WORK;

proc format;
value $stat
'REJECTED' = "1"
'APPROVED' = "0"
other = .;
run;

 

proc print data=info1;
format status $stat.;
run;


options fmtsearch=(WORK);

proc format library=WORK fmtlib;
run;

 

proc freq data=info1;
format status $Status.;
tables status;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

@KRHE wrote:

Hi,

I am having issues with doing a regression since my dep var is string. I've recoded the variable but it won't intergrate into my regression.

Everything is successful but I think that my format and my data do not connect. Perhaps since they are on different paths?

 

libname x xlsx 'C:\Users\BF3513\Desktop\DATA\info1.xls';
run;


proc contents data=info1;
run;

 

proc format library=WORK;

proc format;
value $stat
'REJECTED' = "1"
'APPROVED' = "0"
other = .;
run;

 

proc print data=info1;
format status $stat.;
run;


options fmtsearch=(WORK);

proc format library=WORK fmtlib;
run;

 

proc freq data=info1;
format status $Status.;
tables status;


1. I don't see a regression here

2. You create format $stat and use format $status 

View solution in original post

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

@KRHE wrote:

Hi,

I am having issues with doing a regression since my dep var is string. I've recoded the variable but it won't intergrate into my regression.

Everything is successful but I think that my format and my data do not connect. Perhaps since they are on different paths?

 

libname x xlsx 'C:\Users\BF3513\Desktop\DATA\info1.xls';
run;


proc contents data=info1;
run;

 

proc format library=WORK;

proc format;
value $stat
'REJECTED' = "1"
'APPROVED' = "0"
other = .;
run;

 

proc print data=info1;
format status $stat.;
run;


options fmtsearch=(WORK);

proc format library=WORK fmtlib;
run;

 

proc freq data=info1;
format status $Status.;
tables status;


1. I don't see a regression here

2. You create format $stat and use format $status 

KRHE
Obsidian | Level 7
God bless you @ChrisNZ
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 810 views
  • 0 likes
  • 2 in conversation