top of page

SAS, single-factor model. Pottery component over different sites.

  • Writer: Tung San
    Tung San
  • Jun 23, 2022
  • 2 min read

data pottery;

input Site $2-14 Al Fe Mg Ca Na;

datalines;

Llanederyn 14.4 7.00 4.30 0.15 0.51

Llanederyn 13.8 7.08 3.43 0.12 0.17

Llanederyn 14.6 7.09 3.88 0.13 0.20

Llanederyn 11.5 6.37 5.64 0.16 0.14

Llanederyn 13.8 7.06 5.34 0.20 0.20

Llanederyn 10.9 6.26 3.47 0.17 0.22

Llanederyn 10.1 4.26 4.26 0.20 0.18

Llanederyn 11.6 5.78 5.91 0.18 0.16

Llanederyn 11.1 5.49 4.52 0.29 0.30

Llanederyn 13.4 6.92 7.23 0.28 0.20

Llanederyn 12.4 6.13 5.69 0.22 0.54

Llanederyn 13.1 6.64 5.51 0.31 0.24

Llanederyn 12.7 6.69 4.45 0.20 0.22

Llanederyn 12.5 6.44 3.94 0.22 0.23

Caldicot 11.8 5.44 3.94 0.30 0.04

Caldicot 11.6 5.39 3.77 0.29 0.06

IslandThorns 18.3 1.28 0.67 0.03 0.03

IslandThorns 15.8 2.39 0.63 0.01 0.04

IslandThorns 18.0 1.50 0.67 0.01 0.06

IslandThorns 18.0 1.88 0.68 0.01 0.04

IslandThorns 20.8 1.51 0.72 0.07 0.10

AshleyRails 17.7 1.12 0.56 0.06 0.06

AshleyRails 18.3 1.14 0.67 0.06 0.05

AshleyRails 16.7 0.92 0.53 0.01 0.05

AshleyRails 14.8 2.74 0.67 0.03 0.05

AshleyRails 19.1 1.64 0.60 0.10 0.03

;

run;

title1 "(1) H0: AshleyRails = IslandThorns; (2) H0: AshleyRails = Llanederyn; (3) IslandThorns- Llanederyn; for all components. ";

proc glm data = pottery_sort;

class Site;

model Al Fe Mg Ca Na = Site /nouni;

contrast "(1) AshleyRails - IslandThorns" Site 1 0 -1 0;

contrast "(2) AshleyRails - Llanederyn" Site 1 0 0 -1;

contrast "(3) IslandThorns- Llanederyn" Site 0 0 1 -1;

*Check output data page and sort the "Site" column to see the order!;

manova h=Site m=Al, Fe, Mg, Ca, Na;

run;














H0: No Overall Site effect is rejected. i.e., metal components vary over different sites.









Metal components between site AshleyRails and IslandThorns have no significant difference.











Metal components between site AshleyRails and Llanederyn have significant difference.

title1 j=left "Profile Plot";

title2 j=left "Y: mean of components. X: metal type: Al Fe Mg Ca Na";

proc summary nway data=pottery_sort;

class Site;

var Al Fe Mg Ca Na;

output out=new mean=metal1-metal5;

run;

data plot;

set new;

array means{5} metal1-metal5;

do metal_index = 1 to 5;

Response = means(metal_index);

output;

end;

*Key: stacking vertically!!! check the printed dataset;

drop metal1-metal5;

run;

proc print data=plot;

run;

proc gplot data = plot;

plot Response * metal_index = Site;

symbol1 v=+ i=join;

symbol2 v=x i=join;

symbol3 v=# i=join;

symbol4 v=$ i=join;

symbol5 v=% i=join;













Pottery in site Llanederyn and Caldicot; AsheleyRails and Caldicot have close metal components respectively.



Comments


Post: Blog2 Post
bottom of page