BookmarkSubscribeRSS Feed
Ra6
Calcite | Level 5 Ra6
Calcite | Level 5

Here is my code where I had to find out the effect of machine traffic and overstory treatment on BD_zero_to_five_cm, BD_five_to_ten_cm and  BD_ten_to_twenty_cm separately. Now I added two more variables as covariates (slash volume and average snow depth) where covariates will be regression variable. Then what will be the code if I want to find out the effect of covariates (slash volume and average snow depth) on BD_zero_to_five_cm, BD_five_to_ten_cm and  BD_ten_to_twenty_cm separately.  I am using SAS 9.4. I hope that anyone can give me some suggestions on how to perform this. 

 

data New_data;
Input plot $ traffic $ overstory_trmt $ BD_zero_to_five_cm BD_five_to_ten_cm BD_ten_to_twenty_cm $ slash_volume $ average_snow_depth;

datalines;

1 Low Partial 1.323 1.896 1.410 0 12
1 Low Partial 1.019 1.518 1.260 0.0127 12
1 Low Partial 1.057 1.103 1.583 0.002 12
1 Low Partial 1.218 1.631 1.236 0.00712 12
1 Low Partial 0.990 1.294 0.982 0 12
1 Low Partial 1.081 1.348 1.098 0.0096 12
1 Low Partial 1.166 1.273 1.470 0.0081 12
1 Low Partial 1.017 1.150 1.251 0.0026 12
1 Low Partial 1.293 1.558 1.127 0.004 12
1 Low Partial 1.087 1.433 1.159 0 12
1 Low Partial 1.027 1.394 1.376 0.01 12
1 Low Partial 1.120 1.570 1.501 0 12
2 Low Partial 1.050 1.134 1.022 0 12
2 Low Partial 1.322 1.553 1.555 0 12
2 Low Partial 1.147 1.350 1.424 0 12
2 Low Partial 0.851 1.411 1.272 0 12
2 Low Partial 0.868 1.262 1.040 0 12
2 Low Partial 0.881 1.245 1.156 0 12
2 Low Partial 1.069 1.047 1.047 0 12
2 Low Partial 0.987 1.703 1.481 0 12
2 Low Partial 1.154 1.346 1.181 0 12
2 Low Partial 1.076 1.255 1.184 0 12
2 Low Partial 1.062 1.286 1.165 0.0078 12
2 Low Partial 1.194 1.320 1.627 0 12
3 Low Clearcut 0.966 1.062 0.938 0 15
3 Low Clearcut 1.001 1.085 0.940 0.027 15
3 Low Clearcut 1.217 1.136 1.133 0 15
3 Low Clearcut 0.800 1.193 1.259 0.0088 15
3 Low Clearcut 1.203 1.460 1.280 0.0096 15
3 Low Clearcut 1.162 1.485 1.276 0.0364 15
3 Low Clearcut 1.104 1.457 1.204 0.0042 15
3 Low Clearcut 1.297 1.301 1.578 0.0024 15
3 Low Clearcut 1.332 1.337 1.375 0.0488 15
3 Low Clearcut 0.560 1.434 1.069 0 15
3 Low Clearcut 1.017 1.154 1.258 0.0024 15
3 Low Clearcut 0.925 0.922 1.094 0 15
4 Medium Partial 1.200 1.399 1.089 0 3
4 Medium Partial 1.228 1.692 1.227 0 3
4 Medium Partial 1.058 1.410 1.166 0 3
4 Medium Partial 1.235 1.006 0.979 0 3
4 Medium Partial 1.589 1.485 1.283 0 3
4 Medium Partial 0.948 1.292 1.291 0 3
4 Medium Partial 1.067 0.947 1.190 0 3
4 Medium Partial 1.019 1.157 1.236 0 3
4 Medium Partial 1.344 1.340 1.522 0 3
4 Medium Partial 0.900 1.580 1.289 0 3
4 Medium Partial 1.463 1.589 1.560 0 3
4 Medium Partial 0.073 1.210 1.182 0 3
5 Medium Partial 1.117 1.317 0.986 0.153 1
5 Medium Partial 1.006 1.338 1.050 0 1
5 Medium Partial 0.958 1.008 1.029 0.044 1
5 Medium Partial 0.893 0.992 0.939 0.0096 1
5 Medium Partial 0.978 0.899 0.861 0.0056 1
5 Medium Partial 0.936 1.101 1.240 0.012 1
5 Medium Partial 0.879 0.818 0.926 0.014 1
5 Medium Partial 1.103 1.301 1.141 0.038 1
5 Medium Partial 0.582 1.013 1.046 0.0052 1
5 Medium Partial 1.167 1.301 0.965 0.0132 1
5 Medium Partial 0.895 0.874 1.015 0.0028 1
5 Medium Partial 1.196 1.202 1.076 0.0135 1
6 Medium Partial 0.982 1.452 2.161 0 8
6 Medium Partial 1.149 1.349 1.430 0 8
6 Medium Partial 1.193 2.184 1.569 0 8
6 Medium Partial 1.296 2.065 1.373 0 8
6 Medium Partial 0.921 1.178 1.373 0 8
6 Medium Partial 1.589 1.795 1.750 0 8
6 Medium Partial 0.862 1.169 1.518 0 8
6 Medium Partial 1.315 1.559 1.494 0 8
6 Medium Partial 1.176 1.206 1.537 0 8
6 Medium Partial 1.444 1.737 1.658 0 8
6 Medium Partial 1.462 2.359 0.898 0 8
6 Medium Partial 1.396 1.585 1.680 0 8
7 High Partial 1.174 1.005 1.251 0 3
7 High Partial 1.107 1.621 1.517 0 3
7 High Partial 1.028 1.160 1.028 0 3
7 High Partial 1.293 1.310 1.115 0 3
7 High Partial 0.944 1.181 0.896 0 3
7 High Partial 1.329 1.790 1.067 0 3
7 High Partial 0.932 1.283 0.912 0 3
7 High Partial 1.052 0.932 1.258 0 3
7 High Partial 0.682 0.850 1.277 0 3
7 High Partial 1.054 1.095 1.052 0 3
7 High Partial 1.100 1.102 1.193 0 3
7 High Partial 1.074 1.114 1.173 0 3
8 High Partial 0.984 1.129 1.089 0 3
8 High Partial 1.113 1.136 1.036 0 3
8 High Partial 0.866 1.484 1.113 0 3
8 High Partial 1.027 1.385 1.347 0 3
8 High Partial 0.743 1.005 1.355 0 3
8 High Partial 1.144 1.397 1.317 0 3
8 High Partial 0.831 1.350 1.198 0 3
8 High Partial 0.889 1.184 0.936 0 3
8 High Partial 0.954 1.566 1.161 0 3
8 High Partial 0.789 1.254 1.045 0 3
8 High Partial 1.199 1.396 1.072 0 3
8 High Partial 0.895 1.398 1.317 0 3
9 High Partial 1.472 1.683 1.520 0.0328 8
9 High Partial 1.052 1.406 1.311 0.0288 8
9 High Partial 1.341 1.404 1.382 0.0286 8
9 High Partial 1.114 0.116 1.350 0.0066 8
9 High Partial 1.211 1.294 1.280 0.0116 8
9 High Partial 1.126 1.052 1.488 0 8
9 High Partial 1.204 1.262 0.873 0.021 8
9 High Partial 1.218 1.223 1.155 0.0216 8
9 High Partial 1.265 1.346 1.248 0.0022 8
9 High Partial 1.218 1.105 1.180 0 8
9 High Partial 1.080 1.361 1.532 0.0036 8
9 High Partial 1.000 1.111 1.233 0 8
10 Medium Clearcut 1.054 1.554 1.666 0 9
10 Medium Clearcut 1.721 1.351 1.623 0.009 9
10 Medium Clearcut 1.364 1.624 1.746 0.0042 9
10 Medium Clearcut 0.955 1.153 1.348 0 9
10 Medium Clearcut 1.150 1.817 1.467 0.01 9
10 Medium Clearcut 1.820 1.666 1.545 0.0024 9
10 Medium Clearcut 1.021 1.558 1.673 0.0108 9
10 Medium Clearcut 0.650 1.131 1.304 0.0145 9
10 Medium Clearcut 1.580 1.400 1.544 0 9
10 Medium Clearcut 1.047 1.988 1.481 0 9
10 Medium Clearcut 1.270 1.784 1.693 0.0042 9
10 Medium Clearcut 0.808 1.088 1.895 0.0112 9
11 Medium Clearcut 0.851 1.295 1.905 0.0102 15
11 Medium Clearcut 1.535 1.269 1.279 0.012 15
11 Medium Clearcut 1.346 1.680 1.697 0.018 15
11 Medium Clearcut 1.084 1.546 1.907 0.0175 15
11 Medium Clearcut 0.869 1.229 1.387 0.0351 15
11 Medium Clearcut 1.865 0.964 1.309 0.0144 15
11 Medium Clearcut 1.312 1.257 1.463 0.0028 15
11 Medium Clearcut 1.091 1.169 1.191 0.0037 15
11 Medium Clearcut 1.403 1.394 1.635 0.0032 15
11 Medium Clearcut 0.735 1.031 1.283 0 15
11 Medium Clearcut 0.953 1.005 1.669 0 15
11 Medium Clearcut 0.704 0.963 1.277 0.0052 15
12 Medium Clearcut 0.896 1.427 1.678 0.0342 16
12 Medium Clearcut 0.969 1.900 1.806 0.0096 16
12 Medium Clearcut 0.607 1.090 1.397 0.0026 16
12 Medium Clearcut 1.804 1.645 1.609 0.0253 16
12 Medium Clearcut 0.683 1.315 1.525 0.048 16
12 Medium Clearcut 1.154 2.762 1.619 0 16
12 Medium Clearcut 0.778 1.495 1.830 0.008 16
12 Medium Clearcut 0.790 1.153 1.747 0.076 16
12 Medium Clearcut 1.393 1.995 2.008 0 16
12 Medium Clearcut 0.787 0.804 0.417 0.0084 16
12 Medium Clearcut 0.865 0.831 1.023 0.0132 16
12 Medium Clearcut 0.887 2.708 1.178 0.0261 16
13 Low Clearcut 1.087 1.462 1.034 0.0115 19
13 Low Clearcut 0.954 1.275 1.036 0.0096 19
13 Low Clearcut 1.002 1.430 1.234 0.016 19
13 Low Clearcut 1.491 1.175 1.295 0.0075 19
13 Low Clearcut 1.131 1.299 1.074 0.0357 19
13 Low Clearcut 0.991 0.969 1.022 0.0062 19
13 Low Clearcut 1.004 1.205 1.109 0.0301 19
13 Low Clearcut 1.201 1.058 1.029 0.014 19
13 Low Clearcut 1.073 0.981 1.038 0.0132 19
13 Low Clearcut 1.086 1.304 1.236 0.076 19
13 Low Clearcut 0.995 1.084 1.386 0.0144 19
13 Low Clearcut 0.715 0.791 1.081 0.0115 19
14 Low Partial 1.353 1.694 1.419 0 14
14 Low Partial 0.912 1.241 1.180 0 14
14 Low Partial 0.945 1.381 1.418 0.005 14
14 Low Partial 0.771 1.340 1.270 0.001 14
14 Low Partial 0.842 1.120 1.341 0.01 14
14 Low Partial 0.864 0.952 0.991 0 14
14 Low Partial 1.132 1.981 1.099 0 14
14 Low Partial 1.027 1.376 1.100 0.046 14
14 Low Partial 0.992 1.529 0.869 0 14
14 Low Partial 1.030 1.430 2.150 0.0014 14
14 Low Partial 0.983 1.607 0.834 0.016 14
14 Low Partial 1.093 3.007 0.531 0.004 14
15 Low Clearcut 0.779 1.457 1.329 0 12.5
15 Low Clearcut 1.500 1.058 2.075 0 12.5
15 Low Clearcut 1.006 1.282 1.668 0 12.5
15 Low Clearcut 0.542 0.758 1.461 0 12.5
15 Low Clearcut 1.296 0.786 1.216 0 12.5
15 Low Clearcut 0.916 1.125 1.097 0 12.5
15 Low Clearcut 0.857 1.105 1.333 0 12.5
15 Low Clearcut 0.923 1.014 1.035 0 12.5
15 Low Clearcut 1.003 0.942 1.021 0 12.5
15 Low Clearcut 0.905 1.064 1.047 0 12.5
15 Low Clearcut 0.904 0.988 1.291 0 12.5
15 Low Clearcut 1.167 1.315 1.385 0 12.5
16 High Clearcut 1.125 3.074 0.557 0.0052 8.5
16 High Clearcut 0.923 1.035 1.114 0.06 8.5
16 High Clearcut 0.865 1.262 1.315 0.0308 8.5
16 High Clearcut 1.540 1.049 0.803 0 8.5
16 High Clearcut 1.037 2.497 1.948 0.03 8.5
16 High Clearcut 1.332 2.287 1.951 0 8.5
16 High Clearcut 1.320 1.506 1.721 0.003 8.5
16 High Clearcut 1.143 1.401 1.314 0.018 8.5
16 High Clearcut 1.336 1.464 1.541 0.0161 8.5
16 High Clearcut 1.141 1.319 1.083 0 8.5
16 High Clearcut 0.904 1.279 1.077 0.04275 8.5
16 High Clearcut 0.906 1.175 1.167 0.0108 8.5
17 High Clearcut 0.827 0.950 1.440 0.0759 15
17 High Clearcut 1.054 1.078 1.171 0.0672 15
17 High Clearcut 0.883 1.070 0.961 0.0867 15
17 High Clearcut 0.863 1.110 1.209 0.035 15
17 High Clearcut 1.012 0.893 1.043 0.051 15
17 High Clearcut 0.829 1.047 1.704 0.1288 15
17 High Clearcut 0.842 2.687 1.570 0.0126 15
17 High Clearcut 1.116 1.246 1.121 0.0064 15
17 High Clearcut 1.069 1.115 1.296 0.0513 15
17 High Clearcut 0.968 1.009 1.455 0.066 15
17 High Clearcut 1.222 1.400 1.364 0.043 15
17 High Clearcut 1.069 1.547 1.530 0.0342 15
18 High Clearcut 0.805 1.502 1.701 0.016 15
18 High Clearcut 1.075 1.643 1.568 0.018 15
18 High Clearcut 0.959 1.325 1.275 0.0171 15
18 High Clearcut 1.110 1.475 1.502 0.008 15
18 High Clearcut 0.721 1.027 1.662 0.015 15
18 High Clearcut 0.979 1.998 1.390 0.017 15
18 High Clearcut 1.276 1.736 1.416 0.0123 15
18 High Clearcut 1.166 1.376 1.462 0.0012 15
18 High Clearcut 1.163 1.546 1.718 0.008 15
18 High Clearcut 1.391 1.756 1.820 0.0028 15
18 High Clearcut 1.372 1.252 1.932 0 15
18 High Clearcut 1.128 1.684 1.891 0 15
19 None Partial 1.093 1.088 1.211 0 0
19 None Partial 0.887 0.974 1.092 0 0
19 None Partial 1.071 1.220 1.579 0 0
19 None Partial 0.828 1.237 1.349 0 0
19 None Partial 1.083 1.461 1.498 0 0
19 None Partial 0.714 0.885 1.260 0 0
19 None Partial 0.795 1.304 1.201 0 0
19 None Partial 0.445 1.604 1.328 0 0
19 None Partial 0.807 0.721 1.128 0 0
19 None Partial 1.141 1.196 1.152 0 0
19 None Partial 0.797 1.106 1.102 0 0
19 None Partial 1.130 1.480 1.158 0 0
19 None Partial 1.162 1.711 1.168 0 0
19 None Partial 0.652 0.929 1.228 0 0
19 None Partial 0.923 1.162 1.399 0 0
19 None Partial 0.796 1.292 1.080 0 0
19 None Partial 0.847 1.080 0.745 0 0
19 None Partial 1.025 1.112 2.670 0 0
19 None Clearcut 1.060 1.425 1.219 0 0
19 None Partial 0.753 0.860 1.571 0 0
19 None Partial 1.290 1.146 1.146 0 0
19 None Partial 0.932 1.638 1.695 0 0
19 None Partial 0.956 0.975 0.867 0 0
19 None Partial 0.828 1.377 1.131 0 0
19 None Clearcut 1.003 1.753 1.527 0 0
19 None Clearcut 0.819 1.057 1.374 0 0
19 None Partial 0.949 1.220 0.891 0 0
19 None Clearcut 0.708 1.770 1.330 0 0
19 None Clearcut 0.877 1.109 1.402 0 0
19 None Clearcut 1.006 1.946 1.522 0 0
19 None Partial 0.827 2.489 1.396 0 0
;
PROC GLM;
class traffic overstory_trmt plot;
model BD_zero_to_five_cm = traffic overstory_trmt plot(traffic overstory_trmt);
test h=traffic overstory_trmt e=plot(traffic overstory_trmt);
means traffic overstory_trmt / waller e=plot(traffic overstory_trmt);
LSMeans traffic / Adjust = Tukey;
LSMeans overstory_trmt / Adjust = Tukey;
run;
PROC GLM;
class traffic overstory_trmt plot;
model BD_five_to_ten_cm = traffic overstory_trmt plot(traffic overstory_trmt);
test h=traffic overstory_trmt e=plot(traffic overstory_trmt);
means traffic overstory_trmt / waller e=plot(traffic overstory_trmt);
LSMeans traffic / Adjust = Tukey;
LSMeans overstory_trmt / Adjust = Tukey;
run;
PROC GLM;
class traffic overstory_trmt plot;
model BD_ten_to_twenty_cm = traffic overstory_trmt plot(traffic overstory_trmt);
test h=traffic overstory_trmt e=plot(traffic overstory_trmt);
means traffic overstory_trmt / waller e=plot(traffic overstory_trmt);
LSMeans traffic / Adjust = Tukey;
LSMeans overstory_trmt / Adjust = Tukey;
run;

 

 

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Then what will be the code if I want to find out the effect of covariates (slash volume and average snow depth) on BD_zero_to_five_cm

 

This should work:

 

model BD_zero_to_five_cm = slash_volume average_snow_depth 
    traffic overstory_trmt plot(traffic overstory_trmt);
--
Paige Miller
Ra6
Calcite | Level 5 Ra6
Calcite | Level 5
Unfortunately, it's not working
PaigeMiller
Diamond | Level 26

@Ra6 wrote:
Unfortunately, it's not working

Explain further. Give us details. Show us the SASLOG. Show us the output.

--
Paige Miller
Ra6
Calcite | Level 5 Ra6
Calcite | Level 5

Unfortunately, It's not working

Ra6
Calcite | Level 5 Ra6
Calcite | Level 5

I am attaching my sas file here. So, in my data set, experimental unit is plot which represents combination of treatments which are traffic and overstory and depending variables are BD_zero_to_five_cm BD_five_to_ten_cm BD_ten_to_twenty_cm. So, I had to run my sas file showing the effect of two treatments on  BD_zero_to_five_cm BD_five_to_ten_cm BD_ten_to_twenty_cm. But now I have to add two more variable (slash volume, average snow depth)  as covariates and find out effect of these two covariates (which will be actually covariates as a regression variable following ANCOVA https://onlinecourses.science.psu.edu/stat502/node/183/ ) on each depth   BD_zero_to_five_cm BD_five_to_ten_cm BD_ten_to_twenty_cm. I would like to also mention that, slash volume and average snow depth are continuous data 

data New_data;
Input plot $  traffic $ overstory_trmt $ BD_zero_to_five_cm BD_five_to_ten_cm BD_ten_to_twenty_cm $ slash_volume $ average_snow_depth;

datalines;

1	Low	Partial	1.323	1.896	1.410	0	12
1	Low	Partial	1.019	1.518	1.260	0.0127	12
1	Low	Partial	1.057	1.103	1.583	0.002	12
1	Low	Partial	1.218	1.631	1.236	0.00712	12
1	Low	Partial	0.990	1.294	0.982	0	12
1	Low	Partial	1.081	1.348	1.098	0.0096	12
1	Low	Partial	1.166	1.273	1.470	0.0081	12
1	Low	Partial	1.017	1.150	1.251	0.0026	12
1	Low	Partial	1.293	1.558	1.127	0.004	12
1	Low	Partial	1.087	1.433	1.159	0	12
1	Low	Partial	1.027	1.394	1.376	0.01	12
1	Low	Partial	1.120	1.570	1.501	0	12
2	Low	Partial	1.050	1.134	1.022	0	12
2	Low	Partial	1.322	1.553	1.555	0	12
2	Low	Partial	1.147	1.350	1.424	0	12
2	Low	Partial	0.851	1.411	1.272	0	12
2	Low	Partial	0.868	1.262	1.040	0	12
2	Low	Partial	0.881	1.245	1.156	0	12
2	Low	Partial	1.069	1.047	1.047	0	12
2	Low	Partial	0.987	1.703	1.481	0	12
2	Low	Partial	1.154	1.346	1.181	0	12
2	Low	Partial	1.076	1.255	1.184	0	12
2	Low	Partial	1.062	1.286	1.165	0.0078	12
2	Low	Partial	1.194	1.320	1.627	0	12
3	Low	Clearcut	0.966	1.062	0.938	0	15
3	Low	Clearcut	1.001	1.085	0.940	0.027	15
3	Low	Clearcut	1.217	1.136	1.133	0	15
3	Low	Clearcut	0.800	1.193	1.259	0.0088	15
3	Low	Clearcut	1.203	1.460	1.280	0.0096	15
3	Low	Clearcut	1.162	1.485	1.276	0.0364	15
3	Low	Clearcut	1.104	1.457	1.204	0.0042	15
3	Low	Clearcut	1.297	1.301	1.578	0.0024	15
3	Low	Clearcut	1.332	1.337	1.375	0.0488	15
3	Low	Clearcut	0.560	1.434	1.069	0	15
3	Low	Clearcut	1.017	1.154	1.258	0.0024	15
3	Low	Clearcut	0.925	0.922	1.094	0	15
4	Medium	Partial	1.200	1.399	1.089	0	3
4	Medium	Partial	1.228	1.692	1.227	0	3
4	Medium	Partial	1.058	1.410	1.166	0	3
4	Medium	Partial	1.235	1.006	0.979	0	3
4	Medium	Partial	1.589	1.485	1.283	0	3
4	Medium	Partial	0.948	1.292	1.291	0	3
4	Medium	Partial	1.067	0.947	1.190	0	3
4	Medium	Partial	1.019	1.157	1.236	0	3
4	Medium	Partial	1.344	1.340	1.522	0	3
4	Medium	Partial	0.900	1.580	1.289	0	3
4	Medium	Partial	1.463	1.589	1.560	0	3
4	Medium	Partial	0.073	1.210	1.182	0	3
5	Medium	Partial	1.117	1.317	0.986	0.153	1
5	Medium	Partial	1.006	1.338	1.050	0	1
5	Medium	Partial	0.958	1.008	1.029	0.044	1
5	Medium	Partial	0.893	0.992	0.939	0.0096	1
5	Medium	Partial	0.978	0.899	0.861	0.0056	1
5	Medium	Partial	0.936	1.101	1.240	0.012	1
5	Medium	Partial	0.879	0.818	0.926	0.014	1
5	Medium	Partial	1.103	1.301	1.141	0.038	1
5	Medium	Partial	0.582	1.013	1.046	0.0052	1
5	Medium	Partial	1.167	1.301	0.965	0.0132	1
5	Medium	Partial	0.895	0.874	1.015	0.0028	1
5	Medium	Partial	1.196	1.202	1.076	0.0135	1
6	Medium	Partial	0.982	1.452	2.161	0	8
6	Medium	Partial	1.149	1.349	1.430	0	8
6	Medium	Partial	1.193	2.184	1.569	0	8
6	Medium	Partial	1.296	2.065	1.373	0	8
6	Medium	Partial	0.921	1.178	1.373	0	8
6	Medium	Partial	1.589	1.795	1.750	0	8
6	Medium	Partial	0.862	1.169	1.518	0	8
6	Medium	Partial	1.315	1.559	1.494	0	8
6	Medium	Partial	1.176	1.206	1.537	0	8
6	Medium	Partial	1.444	1.737	1.658	0	8
6	Medium	Partial	1.462	2.359	0.898	0	8
6	Medium	Partial	1.396	1.585	1.680	0	8
7	High	Partial	1.174	1.005	1.251	0	3
7	High	Partial	1.107	1.621	1.517	0	3
7	High	Partial	1.028	1.160	1.028	0	3
7	High	Partial	1.293	1.310	1.115	0	3
7	High	Partial	0.944	1.181	0.896	0	3
7	High	Partial	1.329	1.790	1.067	0	3
7	High	Partial	0.932	1.283	0.912	0	3
7	High	Partial	1.052	0.932	1.258	0	3
7	High	Partial	0.682	0.850	1.277	0	3
7	High	Partial	1.054	1.095	1.052	0	3
7	High	Partial	1.100	1.102	1.193	0	3
7	High	Partial	1.074	1.114	1.173	0	3
8	High	Partial	0.984	1.129	1.089	0	3
8	High	Partial	1.113	1.136	1.036	0	3
8	High	Partial	0.866	1.484	1.113	0	3
8	High	Partial	1.027	1.385	1.347	0	3
8	High	Partial	0.743	1.005	1.355	0	3
8	High	Partial	1.144	1.397	1.317	0	3
8	High	Partial	0.831	1.350	1.198	0	3
8	High	Partial	0.889	1.184	0.936	0	3
8	High	Partial	0.954	1.566	1.161	0	3
8	High	Partial	0.789	1.254	1.045	0	3
8	High	Partial	1.199	1.396	1.072	0	3
8	High	Partial	0.895	1.398	1.317	0	3
9	High	Partial	1.472	1.683	1.520	0.0328	8
9	High	Partial	1.052	1.406	1.311	0.0288	8
9	High	Partial	1.341	1.404	1.382	0.0286	8
9	High	Partial	1.114	0.116	1.350	0.0066	8
9	High	Partial	1.211	1.294	1.280	0.0116	8
9	High	Partial	1.126	1.052	1.488	0	8
9	High	Partial	1.204	1.262	0.873	0.021	8
9	High	Partial	1.218	1.223	1.155	0.0216	8
9	High	Partial	1.265	1.346	1.248	0.0022	8
9	High	Partial	1.218	1.105	1.180	0	8
9	High	Partial	1.080	1.361	1.532	0.0036	8
9	High	Partial	1.000	1.111	1.233	0	8
10	Medium	Clearcut	1.054	1.554	1.666	0	9
10	Medium	Clearcut	1.721	1.351	1.623	0.009	9
10	Medium	Clearcut	1.364	1.624	1.746	0.0042	9
10	Medium	Clearcut	0.955	1.153	1.348	0	9
10	Medium	Clearcut	1.150	1.817	1.467	0.01	9
10	Medium	Clearcut	1.820	1.666	1.545	0.0024	9
10	Medium	Clearcut	1.021	1.558	1.673	0.0108	9
10	Medium	Clearcut	0.650	1.131	1.304	0.0145	9
10	Medium	Clearcut	1.580	1.400	1.544	0	9
10	Medium	Clearcut	1.047	1.988	1.481	0	9
10	Medium	Clearcut	1.270	1.784	1.693	0.0042	9
10	Medium	Clearcut	0.808	1.088	1.895	0.0112	9
11	Medium	Clearcut	0.851	1.295	1.905	0.0102	15
11	Medium	Clearcut	1.535	1.269	1.279	0.012	15
11	Medium	Clearcut	1.346	1.680	1.697	0.018	15
11	Medium	Clearcut	1.084	1.546	1.907	0.0175	15
11	Medium	Clearcut	0.869	1.229	1.387	0.0351	15
11	Medium	Clearcut	1.865	0.964	1.309	0.0144	15
11	Medium	Clearcut	1.312	1.257	1.463	0.0028	15
11	Medium	Clearcut	1.091	1.169	1.191	0.0037	15
11	Medium	Clearcut	1.403	1.394	1.635	0.0032	15
11	Medium	Clearcut	0.735	1.031	1.283	0	15
11	Medium	Clearcut	0.953	1.005	1.669	0	15
11	Medium	Clearcut	0.704	0.963	1.277	0.0052	15
12	Medium	Clearcut	0.896	1.427	1.678	0.0342	16
12	Medium	Clearcut	0.969	1.900	1.806	0.0096	16
12	Medium	Clearcut	0.607	1.090	1.397	0.0026	16
12	Medium	Clearcut	1.804	1.645	1.609	0.0253	16
12	Medium	Clearcut	0.683	1.315	1.525	0.048	16
12	Medium	Clearcut	1.154	2.762	1.619	0	16
12	Medium	Clearcut	0.778	1.495	1.830	0.008	16
12	Medium	Clearcut	0.790	1.153	1.747	0.076	16
12	Medium	Clearcut	1.393	1.995	2.008	0	16
12	Medium	Clearcut	0.787	0.804	0.417	0.0084	16
12	Medium	Clearcut	0.865	0.831	1.023	0.0132	16
12	Medium	Clearcut	0.887	2.708	1.178	0.0261	16
13	Low	Clearcut	1.087	1.462	1.034	0.0115	19
13	Low	Clearcut	0.954	1.275	1.036	0.0096	19
13	Low	Clearcut	1.002	1.430	1.234	0.016	19
13	Low	Clearcut	1.491	1.175	1.295	0.0075	19
13	Low	Clearcut	1.131	1.299	1.074	0.0357	19
13	Low	Clearcut	0.991	0.969	1.022	0.0062	19
13	Low	Clearcut	1.004	1.205	1.109	0.0301	19
13	Low	Clearcut	1.201	1.058	1.029	0.014	19
13	Low	Clearcut	1.073	0.981	1.038	0.0132	19
13	Low	Clearcut	1.086	1.304	1.236	0.076	19
13	Low	Clearcut	0.995	1.084	1.386	0.0144	19
13	Low	Clearcut	0.715	0.791	1.081	0.0115	19
14	Low	Partial	1.353	1.694	1.419	0	14
14	Low	Partial	0.912	1.241	1.180	0	14
14	Low	Partial	0.945	1.381	1.418	0.005	14
14	Low	Partial	0.771	1.340	1.270	0.001	14
14	Low	Partial	0.842	1.120	1.341	0.01	14
14	Low	Partial	0.864	0.952	0.991	0	14
14	Low	Partial	1.132	1.981	1.099	0	14
14	Low	Partial	1.027	1.376	1.100	0.046	14
14	Low	Partial	0.992	1.529	0.869	0	14
14	Low	Partial	1.030	1.430	2.150	0.0014	14
14	Low	Partial	0.983	1.607	0.834	0.016	14
14	Low	Partial	1.093	3.007	0.531	0.004	14
15	Low	Clearcut	0.779	1.457	1.329	0	12.5
15	Low	Clearcut	1.500	1.058	2.075	0	12.5
15	Low	Clearcut	1.006	1.282	1.668	0	12.5
15	Low	Clearcut	0.542	0.758	1.461	0	12.5
15	Low	Clearcut	1.296	0.786	1.216	0	12.5
15	Low	Clearcut	0.916	1.125	1.097	0	12.5
15	Low	Clearcut	0.857	1.105	1.333	0	12.5
15	Low	Clearcut	0.923	1.014	1.035	0	12.5
15	Low	Clearcut	1.003	0.942	1.021	0	12.5
15	Low	Clearcut	0.905	1.064	1.047	0	12.5
15	Low	Clearcut	0.904	0.988	1.291	0	12.5
15	Low	Clearcut	1.167	1.315	1.385	0	12.5
16	High	Clearcut	1.125	3.074	0.557	0.0052	8.5
16	High	Clearcut	0.923	1.035	1.114	0.06	8.5
16	High	Clearcut	0.865	1.262	1.315	0.0308	8.5
16	High	Clearcut	1.540	1.049	0.803	0	8.5
16	High	Clearcut	1.037	2.497	1.948	0.03	8.5
16	High	Clearcut	1.332	2.287	1.951	0	8.5
16	High	Clearcut	1.320	1.506	1.721	0.003	8.5
16	High	Clearcut	1.143	1.401	1.314	0.018	8.5
16	High	Clearcut	1.336	1.464	1.541	0.0161	8.5
16	High	Clearcut	1.141	1.319	1.083	0	8.5
16	High	Clearcut	0.904	1.279	1.077	0.04275	8.5
16	High	Clearcut	0.906	1.175	1.167	0.0108	8.5
17	High	Clearcut	0.827	0.950	1.440	0.0759	15
17	High	Clearcut	1.054	1.078	1.171	0.0672	15
17	High	Clearcut	0.883	1.070	0.961	0.0867	15
17	High	Clearcut	0.863	1.110	1.209	0.035	15
17	High	Clearcut	1.012	0.893	1.043	0.051	15
17	High	Clearcut	0.829	1.047	1.704	0.1288	15
17	High	Clearcut	0.842	2.687	1.570	0.0126	15
17	High	Clearcut	1.116	1.246	1.121	0.0064	15
17	High	Clearcut	1.069	1.115	1.296	0.0513	15
17	High	Clearcut	0.968	1.009	1.455	0.066	15
17	High	Clearcut	1.222	1.400	1.364	0.043	15
17	High	Clearcut	1.069	1.547	1.530	0.0342	15
18	High	Clearcut	0.805	1.502	1.701	0.016	15
18	High	Clearcut	1.075	1.643	1.568	0.018	15
18	High	Clearcut	0.959	1.325	1.275	0.0171	15
18	High	Clearcut	1.110	1.475	1.502	0.008	15
18	High	Clearcut	0.721	1.027	1.662	0.015	15
18	High	Clearcut	0.979	1.998	1.390	0.017	15
18	High	Clearcut	1.276	1.736	1.416	0.0123	15
18	High	Clearcut	1.166	1.376	1.462	0.0012	15
18	High	Clearcut	1.163	1.546	1.718	0.008	15
18	High	Clearcut	1.391	1.756	1.820	0.0028	15
18	High	Clearcut	1.372	1.252	1.932	0	15
18	High	Clearcut	1.128	1.684	1.891	0	15
19	None	Partial	1.093	1.088	1.211	0	0
19	None	Partial	0.887	0.974	1.092	0	0
19	None	Partial	1.071	1.220	1.579	0	0
19	None	Partial	0.828	1.237	1.349	0	0
19	None	Partial	1.083	1.461	1.498	0	0
19	None	Partial	0.714	0.885	1.260	0	0
19	None	Partial	0.795	1.304	1.201	0	0
19	None	Partial	0.445	1.604	1.328	0	0
19	None	Partial	0.807	0.721	1.128	0	0
19	None	Partial	1.141	1.196	1.152	0	0
19	None	Partial	0.797	1.106	1.102	0	0
19	None	Partial	1.130	1.480	1.158	0	0
19	None	Partial	1.162	1.711	1.168	0	0
19	None	Partial	0.652	0.929	1.228	0	0
19	None	Partial	0.923	1.162	1.399	0	0
19	None	Partial	0.796	1.292	1.080	0	0
19	None	Partial	0.847	1.080	0.745	0	0
19	None	Partial	1.025	1.112	2.670	0	0
19	None	Clearcut	1.060	1.425	1.219	0	0
19	None	Partial	0.753	0.860	1.571	0	0
19	None	Partial	1.290	1.146	1.146	0	0
19	None	Partial	0.932	1.638	1.695	0	0
19	None	Partial	0.956	0.975	0.867	0	0
19	None	Partial	0.828	1.377	1.131	0	0
19	None	Clearcut	1.003	1.753	1.527	0	0
19	None	Clearcut	0.819	1.057	1.374	0	0
19	None	Partial	0.949	1.220	0.891	0	0
19	None	Clearcut	0.708	1.770	1.330	0	0
19	None	Clearcut	0.877	1.109	1.402	0	0
19	None	Clearcut	1.006	1.946	1.522	0	0
19	None	Partial	0.827	2.489	1.396	0	0
;
PROC GLM;
class traffic overstory_trmt plot;
model BD_zero_to_five_cm = traffic overstory_trmt plot(traffic overstory_trmt);
test h=traffic overstory_trmt e=plot(traffic overstory_trmt);
means traffic overstory_trmt / waller e=plot(traffic overstory_trmt);
LSMeans traffic / Adjust = Tukey;
LSMeans overstory_trmt / Adjust = Tukey;
run;
PROC GLM;
class traffic overstory_trmt plot;
model BD_five_to_ten_cm = traffic overstory_trmt plot(traffic overstory_trmt);
test h=traffic overstory_trmt e=plot(traffic overstory_trmt);
means traffic overstory_trmt / waller e=plot(traffic overstory_trmt);
LSMeans traffic / Adjust = Tukey;
LSMeans overstory_trmt / Adjust = Tukey;
run;
PROC GLM;
class traffic overstory_trmt plot;
model BD_ten_to_twenty_cm = traffic overstory_trmt plot(traffic overstory_trmt);
test h=traffic overstory_trmt e=plot(traffic overstory_trmt);
means traffic overstory_trmt / waller e=plot(traffic overstory_trmt);
LSMeans traffic / Adjust = Tukey;
LSMeans overstory_trmt / Adjust = Tukey;
run;

#Effect of slash volume and average snow depth

proc reg data=New_data;
model BD_zero_to_five_cm = slash_volume average_snow_depth 
    traffic overstory_trmt plot(traffic overstory_trmt);

model BD_five_to_ten_cm = slash_volume average_snow_depth 
    traffic overstory_trmt plot(traffic overstory_trmt);

model BD_ten_to_twenty_cm = slash_volume average_snow_depth 
    traffic overstory_trmt plot(traffic overstory_trmt);

 

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

You have specified a mixed model, with plots nested within traffic and overstory_trmt. The REG procedure cannot do a mixed model, and you should use either MIXED or GLIMMIX rather than GLM. SAS® for Mixed Models, Second Edition is an excellent resource for mixed models.

 

I suspect that you have issues with your dataset:

(1) slash_volume and BD_ten_to_twenty_cm should be numeric, not text.

(2) Plot 19 has records for both levels of overstory_trmt which could indicate typographical errors.

(3) slash_volume is zero for all records in several plots (4, 6, 7, 8, 15, 19). This data pattern is not ideal for a regression on slash_volume in a mixed model.

 

I hope this helps.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1752 views
  • 2 likes
  • 3 in conversation