The script begins by setting a title for the output. Then, it creates a dataset named 'pottery' using inline data (datalines). This dataset contains information on the discovery site (Site) and the concentrations of several chemical elements (Al, Fe, Mg, Ca, Na). Finally, PROC GLM is used to perform a MANOVA. It specifies 'Site' as a classification variable and the chemical elements as dependent variables. A contrast is defined to compare the 'Llanederyn' site to the rest of the sites. The option 'manova h=_all_ / printe printh;' is used to request the printing of E and H matrices for all effects, which is essential for MANOVA interpretation.
Data Analysis
Type : CREATION_INTERNE
The data is created directly within the script via a DATA STEP block with DATALINES statements. It represents the chemical composition of pottery from different sites (Llanederyn, Caldicot, IslandThorns, AshleyRails) and their concentrations of Aluminum, Iron, Magnesium, Calcium, and Sodium.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block creates a temporary dataset named 'pottery'. It defines the 'Site' variable (character of length 12) and the concentrations of chemical elements (Al, Fe, Mg, Ca, Na) as numeric. The data is then read directly from the subsequent lines via the DATALINES statement.
Explanation : This block uses the GLM procedure to perform a multivariate analysis of variance (MANOVA). The CLASS statement declares 'Site' as a categorical variable. The MODEL statement specifies that the element concentrations (Al, Fe, Mg, Ca, Na) are the dependent variables and that 'Site' is the explanatory variable. A CONTRAST is defined to test the effect of 'Llanederyn' against the three other combined sites. The MANOVA statement requests a MANOVA analysis for all model effects (`h=_all_`), with the display of hypothesis (H) and error (E) matrices (`printe printh`) for a detailed interpretation of the results.
Copied!
proc glm data=pottery;
class Site;
model Al Fe Mg Ca Na = Site;
contrast 'Llanederyn vs. the rest' Site 1 1 1 -3;
manova h=_all_ / printe printh;
run;
1
PROC GLMDATA=pottery;
2
class Site;
3
model Al Fe Mg Ca Na = Site;
4
contrast 'Llanederyn vs. the rest' Site 111 -3;
5
manova h=_all_ / printe printh;
6
RUN;
7
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : /****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: GLMEX6 */
/* TITLE: Example 6 for PROC GLM */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: MANOVA */
/* PROCS: GLM */
/* DATA: */
/* */
/* REF: PROC GLM, EXAMPLE 6. */
/* MISC: */
/****************************************************************/
« In archaeometry, determining the origin of artifacts requires more than just looking at individual elements; it requires a holistic view of chemical "fingerprints." Using PROC GLM for MANOVA is the professional choice here because it analyzes the vector of concentrations (Al, Fe, Mg, Ca, Na) simultaneously, accounting for the correlations between these elements that individual ANOVAs would miss. »
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.