Data Prep Sheet

Action Principale : bartProbit

Preparation Code

Script awaiting validation
Copied!
1DATA purchase_data;
2 call streaminit(123);
3 DO i = 1 to 1000;
4 Age = 20 + int(rand('Uniform') * 50);
5 Income = 30000 + int(rand('Uniform') * 70000);
6 IF rand('Uniform') > 0.5 THEN Gender = 'Male';
7 ELSE Gender = 'Female';
8 logit_p = -4 + 0.05*Age + 0.00002*Income + (Gender='Female');
9 p = 1 / (1 + exp(-logit_p));
10 Purchased = rand('Bernoulli', p);
11 OUTPUT;
12 END;
13RUN;
14 
15DATA casuser.purchase_data;
16 SET purchase_data;
17RUN;
Actions using this script
  • bart bartProbit En cours
  • No other action uses this exact script.