Hi guys, there is any alternative way to create a classdata dataset,
not using cards, or datalines? Thanks in advance. V
I need to create a classdata dataset like this one:
dataset classdata:
1
2
3
You need to provide more information on what you're trying to do.
You can use a do loop and output statement but I have no idea if that's what you're looking for.
data want;
do i=1 to 3;
output;
end;
run;
The idea is that, I got this dataset:
cat population trt count
A population_d 1 1
A total 3 1
B population_d 1 1
B total 3 1
C population_d 1 1
C total 3 1
In terms of show the report, populationx_p (trt=2), count=0 is not appear, and rather to put it manually (hardcode), I want to introduce it using classdata:
classdata population
population_d
population_p
total
classdata trteatment
1
2
3
to get the final dataset:
A population1_d 1 1
A population2_p 2 0
A total 3 1
B population1_d 1 1
B population2_p 2 0
B total 3 1
C population1_d 1 1
C population2_p 2 0
C total 3 1
sorry that one:
A population_d 1 1
A population_p 2 0
A total 3 1
B population_d 1 1
B population_p 2 0
B total 3 1
C population_d 1 1
C population_p 2 0
C total 3 1
You posted a similar question a few days ago, regarding color and models.
The solution is similar, create an empty dataset and join via proc sql.
A better solution is to ensure the data is generated will all the values, using sparse option in proc freq or another option.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.