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?

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