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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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