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-2024.png

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.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 730 views
  • 0 likes
  • 2 in conversation