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

Hi,

 

I am facing a problem to run my sas code. My advisor's advice was, "When you run your ANOVA, it will provide you with averages for each treatment classification. Essentially, you are using ANOVA to compare means among multiple treatment classifications to determine if the bulk densities are significantly different among the different treatments. The covariates being snow depth and slash volume. That will tell you if those two variables (snow depth and slash volume) had any significant effect on each depth of bulk density."

 

I tried a lot but I could not solve. Here is my code: 

 

 

 

libname rafia 'C:\Users\rafiar\Documents\My SAS Files';

data New_data;
	Input Plot $ Sample $ percentage_of_rock_cover $ zero_to_five $ five_to_ten $ ten_to_twenty $ Slash_Volume $ Average_Snow_Depth;
	datalines;

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


PROC ANOVA data=New_data;

class plot;
model zero_to_five five_to_ten ten_to_twenty = plot;
manova h = plot;
run;

proc reg data = New_data;
	model zero_to_five = Slash_Volume Average_Snow_Depth;
run;

proc reg data = New_data;
	model five_to_ten = Slash_Volume Average_Snow_Depth;
run;

proc reg data = New_data;
	model ten_to_twenty= Slash_Volume Average_Snow_Depth;
run;

proc print;
run;

proc import datafile = '\\homedir.mtu.edu\home\My SAS Files\Soil.csv'
	out = work.Soil
	dbms = CSV
;
run;

 

 

 I am also attaching the excel file here

3 REPLIES 3
Reeza
Super User

What's the question you want us to answer here?
Why are you reading your data as characters when they're clearly numeric? PROC ANOVA and REG need a QUIT statement as well as RUN.

 

Spoiler

@Ra6 wrote:

Hi,

 

I am facing a problem to run my sas code. My advisor's advice was, "When you run your ANOVA, it will provide you with averages for each treatment classification. Essentially, you are using ANOVA to compare means among multiple treatment classifications to determine if the bulk densities are significantly different among the different treatments. The covariates being snow depth and slash volume. That will tell you if those two variables (snow depth and slash volume) had any significant effect on each depth of bulk density."

 

I tried a lot but I could not solve. Here is my code: 

 

 

 

libname rafia 'C:\Users\rafiar\Documents\My SAS Files';

data New_data;
	Input Plot $ Sample $ percentage_of_rock_cover $ zero_to_five $ five_to_ten $ ten_to_twenty $ Slash_Volume $ Average_Snow_Depth;
	datalines;

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


PROC ANOVA data=New_data;

class plot;
model zero_to_five five_to_ten ten_to_twenty = plot;
manova h = plot;
run;

proc reg data = New_data;
	model zero_to_five = Slash_Volume Average_Snow_Depth;
run;

proc reg data = New_data;
	model five_to_ten = Slash_Volume Average_Snow_Depth;
run;

proc reg data = New_data;
	model ten_to_twenty= Slash_Volume Average_Snow_Depth;
run;

proc print;
run;

proc import datafile = '\\homedir.mtu.edu\home\My SAS Files\Soil.csv'
	out = work.Soil
	dbms = CSV
;
run;

 

 

 I am also attaching the excel file here


Ra6
Calcite | Level 5 Ra6
Calcite | Level 5

 Thanks for your suggestion. I got it. 

ballardw
Super User

"I could not solve" is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

I'm pretty sure you had errors as Proc Reg is intended to handle numeric values. You can also have multiple model statements so SAS need not load the data multiple times:

proc reg data = New_data;
   first:  model zero_to_five = Slash_Volume Average_Snow_Depth;
   second: model five_to_ten  = Slash_Volume Average_Snow_Depth;
   third:  model ten_to_twenty= Slash_Volume Average_Snow_Depth;
run;
quit;

The text before the : on each model  statement is a label and the results will show something like:

 

The REG Procedure
Model: first
Dependent Variable: zero_to_five

to let you know which model statement generated the following output.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 1523 views
  • 2 likes
  • 3 in conversation