BookmarkSubscribeRSS Feed
Ariane_Helena
Calcite | Level 5

I usually code in R and python and have recently been using wps. I am trying to save a logistic regression model and use it in another r proc to no avail. Can anyone help me?

 

proc r;
submit;
weight <- runif(100,5,65)
x_1 <- runif(100,0,1)
x_2 <- runif(100,2,10)
sex <- factor(rep(c("H","F"),each=3,length.out=100))
chd <- factor(rep(c("Oui","Non"),each=2,length.out=100))
data <- data.frame(chd,weight,x_1,x_2,sex)
endsubmit;
import R=data;
run;

proc r;
export data=DATA;
submit;
DATA$chd<-factor(DATA$chd)
DATA$sex <- factor(DATA$sex)
mdl <- glm(chd~.,data=DATA, family=binomial(logit))
endsubmit;
save catalog=WORK.mdl.entry R='mdl'n;
run;

proc r;
load cat=WORK.mdl.entry R='MDL'n ;
import R='MDL'n ;
run;

1 REPLY 1
japelin
Rhodochrosite | Level 12

Sure, WPS can handle SAS languages, but I think you should contact wps support or post in the WPS User Forum?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 778 views
  • 2 likes
  • 2 in conversation