BookmarkSubscribeRSS Feed
DelBS
Calcite | Level 5

Hello,

 

I have run a factorial experiment with multiple levels of two factors. The first factor, Factor A, is the type of solute applied to my experimental units (7 levels). The second factor, Factor B, is the concentration of  solute applied to my experimental units (3 levels). I included a treatment without solute which provides a baseline measure of my response variable when the cocentration of solute applied is 0 grams / liter; it provides a fourth level for Factor B. How do I assign the control data as the '0' level data for Factor B across all of my levels for Factor A? I don't want to enter the data for my control treatment multiple times, since there was only one observation, however it applies to all of my levels of Factor A as level '0' of Factor B.

 

Factor AFactor B (g/L)
Without solute (control)0
Solute 11
Solute 21
Solute 31
Solute 41
Solute 51
Solute 61
Solute 71
Solute 15
Solute 25
Solute 35
Solute 45
Solute 55
Solute 65
Solute 75
Solute 110
Solute 210
Solute 310
Solute 410
Solute 510
Solute 610
Solute 710

 

Cheers,

 

Delaney.

1 REPLY 1
Shmuel
Garnet | Level 18

You can assign the base line factor as a macro variable, out of all input data steps:

 

%let baseline_factor = 0;

 

So you do it once only. You can add it to the "sasinit" so don't nead to care at every input program. 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 888 views
  • 0 likes
  • 2 in conversation