This document provides an overview of the PROC FREQ statement in SAS for conducting frequency and crosstabulation analysis. It includes examples of different TABLES statement requests and the corresponding output. It also demonstrates options for the TABLES statement like EXPECTED, CHISQ, FISHER, and AGREE that provide additional statistical tests and measures of association between variables.
This document provides an overview of the PROC FREQ statement in SAS for conducting frequency and crosstabulation analysis. It includes examples of different TABLES statement requests and the corresponding output. It also demonstrates options for the TABLES statement like EXPECTED, CHISQ, FISHER, and AGREE that provide additional statistical tests and measures of association between variables.
The document describes the PROC PLOT procedure in SAS for creating scatter plots. It provides the basic syntax for PROC PLOT, shows how to use BY variables to create separate plots, and gives examples of using options like BOX, VAXIS, and HAXIS to customize the axes.
Multiple linear regression allows modeling a dependent variable as a linear combination of multiple independent variables. The REG procedure in SAS can be used to perform multiple linear regression. It allows selection of independent variables using forward, backward, or stepwise selection methods. An example demonstrates generating simulated data with multiple independent variables and a dependent variable, then using the REG procedure with forward selection to identify a best fitting regression model.
This document provides information on performing simple linear regression using the REG procedure in SAS. It describes the syntax for the PROC REG statement and MODEL statement to define the dependent and independent variables. Examples are given to generate random x and y data, perform linear regression with PROC REG and model statement, and output diagnostic plots of the residuals versus predicted values and x versus y.
The CORR procedure in SAS calculates several types of correlation between variables:
- Pearson product-moment correlation for linear relationships
- Rank correlations including Spearman and Kendall's tau-b
- Hoeffding's measure of dependence
- Partial correlations can also be calculated to assess the relationship between two variables while controlling for other variables.
The procedure syntax allows specification of variables, frequency and ID variables, use of weights, and generation of correlation and scatter plots. Examples demonstrate its use for correlation and partial correlation analysis of datasets.
1. The document discusses different methods for improving SAS programs and outputs, including comment statements, title statements, and system options.
2. It compares the comment statements "*message;" and "/*message*/" and explains that "/*message*/" can ignore all content within the comment.
3. Examples are provided to demonstrate how title statements and system options like NODATE can modify output reports.
Here is the code to complete the homework instructions for Exercise 2.10:
```sas
/*1. Convert variable values*/
data ex2_10;
set Ex2-10.dat;
if sex=1 then gender='male';
else gender='female';
run;
/*2. Frequency table*/
proc freq data=ex2_10;
tables gender;
run;
/*3. Histograms by gender*/
proc univariate data=ex2_10;
var grade;
histogram / normal;
by gender;
run;
/*4. Boxplots to compare distributions*/
proc boxplot data=ex2_10;
plot grade
This document discusses running a two-way ANOVA in SAS with an unbalanced design. It shows the SAS code to specify a class and model statement to analyze the effects of factors A and B and their interaction on the response variable y. It also provides code examples for generating contrasts and least squares means comparisons. Dummy variable coding is explained as a method for representing categorical variables in the model. Finally, alternative approaches for analyzing main effects and interactions are suggested if contrast analysis cannot be run directly.
This document discusses repeated measures analysis of variance (ANOVA). It provides an example of a 2-way repeated measures ANOVA with factors A and B. It also demonstrates how to perform a general linear model (GLM) in SAS to analyze repeated measures data, including specifying the within-subject factor in the REPEATED statement. Finally, it discusses mixed models that include both between-subject and within-subject factors and provides code for a GLM analyzing log-histamine concentrations over time in dogs receiving different drug treatments.
This document provides an example of using PROC GLM in SAS to perform a balanced ANOVA on stem length data from a randomized complete block experiment with seven plant types. The PROC GLM is used to fit a model with main effects for block and type. Contrast statements are included to test specific pairwise comparisons between types. Means for each type are also obtained.
PROC ANOVA is used to perform analysis of variance on experimental data. It allows specification of classification variables using CLASS, dependent variables using MODEL, and post hoc comparisons using MEANS. Examples show using PROC ANOVA to analyze a one-way ANOVA model with multiple comparisons, and a repeated measures ANOVA to analyze how an interest level changes over time. Questions ask about the differences between ANOVA and linear regression, the expected value of mean squared error, and fixed/random effects.
This SAS tutorial discusses procedures for correlation (PROC CORR) and frequency analysis (PROC FREQ). It provides examples of using PROC CORR to generate a correlation matrix and scatter plot for bivariate relationships. PROC FREQ is demonstrated through a 2x3 cross tabulation with chi-square test to examine differences in agreement with premarital sex between males and females. Additional concepts covered include partial correlation, missing values, variance/covariance matrix, and transforming scores to a normal distribution with mean 80 and standard deviation 10 using PROC STANDARD.
This SAS tutorial discusses procedures for correlation (PROC CORR) and frequency analysis (PROC FREQ). It provides examples of using PROC CORR to generate a correlation matrix and scatter plot for bivariate relationships. PROC FREQ is demonstrated through a 2x3 cross tabulation and chi-square test to examine potential gender differences in attitudes. Additional concepts reviewed include partial correlation, missing data handling, variance/covariance matrices, and the chi-square distribution.
The document discusses the scientific study of the biological basis of consciousness. It describes how scientists are now actively investigating this topic that was traditionally in the domain of philosophy. Some insights have come from studying neurological patients whose injuries altered their consciousness. However, current research can only provide fragmented pieces of the consciousness puzzle and few address the most enigmatic aspect of human consciousness - the sense of self. Scientists hope to learn not just the biological basis but also why consciousness exists by studying its development and presence in other species.
The document describes the PROC PLOT procedure in SAS for creating scatter plots. It provides the basic syntax for PROC PLOT, shows how to use BY variables to create separate plots, and gives examples of using options like BOX, VAXIS, and HAXIS to customize the axes.
Multiple linear regression allows modeling a dependent variable as a linear combination of multiple independent variables. The REG procedure in SAS can be used to perform multiple linear regression. It allows selection of independent variables using forward, backward, or stepwise selection methods. An example demonstrates generating simulated data with multiple independent variables and a dependent variable, then using the REG procedure with forward selection to identify a best fitting regression model.
This document provides information on performing simple linear regression using the REG procedure in SAS. It describes the syntax for the PROC REG statement and MODEL statement to define the dependent and independent variables. Examples are given to generate random x and y data, perform linear regression with PROC REG and model statement, and output diagnostic plots of the residuals versus predicted values and x versus y.
The CORR procedure in SAS calculates several types of correlation between variables:
- Pearson product-moment correlation for linear relationships
- Rank correlations including Spearman and Kendall's tau-b
- Hoeffding's measure of dependence
- Partial correlations can also be calculated to assess the relationship between two variables while controlling for other variables.
The procedure syntax allows specification of variables, frequency and ID variables, use of weights, and generation of correlation and scatter plots. Examples demonstrate its use for correlation and partial correlation analysis of datasets.
1. The document discusses different methods for improving SAS programs and outputs, including comment statements, title statements, and system options.
2. It compares the comment statements "*message;" and "/*message*/" and explains that "/*message*/" can ignore all content within the comment.
3. Examples are provided to demonstrate how title statements and system options like NODATE can modify output reports.
Here is the code to complete the homework instructions for Exercise 2.10:
```sas
/*1. Convert variable values*/
data ex2_10;
set Ex2-10.dat;
if sex=1 then gender='male';
else gender='female';
run;
/*2. Frequency table*/
proc freq data=ex2_10;
tables gender;
run;
/*3. Histograms by gender*/
proc univariate data=ex2_10;
var grade;
histogram / normal;
by gender;
run;
/*4. Boxplots to compare distributions*/
proc boxplot data=ex2_10;
plot grade
This document discusses running a two-way ANOVA in SAS with an unbalanced design. It shows the SAS code to specify a class and model statement to analyze the effects of factors A and B and their interaction on the response variable y. It also provides code examples for generating contrasts and least squares means comparisons. Dummy variable coding is explained as a method for representing categorical variables in the model. Finally, alternative approaches for analyzing main effects and interactions are suggested if contrast analysis cannot be run directly.
This document discusses repeated measures analysis of variance (ANOVA). It provides an example of a 2-way repeated measures ANOVA with factors A and B. It also demonstrates how to perform a general linear model (GLM) in SAS to analyze repeated measures data, including specifying the within-subject factor in the REPEATED statement. Finally, it discusses mixed models that include both between-subject and within-subject factors and provides code for a GLM analyzing log-histamine concentrations over time in dogs receiving different drug treatments.
This document provides an example of using PROC GLM in SAS to perform a balanced ANOVA on stem length data from a randomized complete block experiment with seven plant types. The PROC GLM is used to fit a model with main effects for block and type. Contrast statements are included to test specific pairwise comparisons between types. Means for each type are also obtained.
PROC ANOVA is used to perform analysis of variance on experimental data. It allows specification of classification variables using CLASS, dependent variables using MODEL, and post hoc comparisons using MEANS. Examples show using PROC ANOVA to analyze a one-way ANOVA model with multiple comparisons, and a repeated measures ANOVA to analyze how an interest level changes over time. Questions ask about the differences between ANOVA and linear regression, the expected value of mean squared error, and fixed/random effects.
This SAS tutorial discusses procedures for correlation (PROC CORR) and frequency analysis (PROC FREQ). It provides examples of using PROC CORR to generate a correlation matrix and scatter plot for bivariate relationships. PROC FREQ is demonstrated through a 2x3 cross tabulation with chi-square test to examine differences in agreement with premarital sex between males and females. Additional concepts covered include partial correlation, missing values, variance/covariance matrix, and transforming scores to a normal distribution with mean 80 and standard deviation 10 using PROC STANDARD.
This SAS tutorial discusses procedures for correlation (PROC CORR) and frequency analysis (PROC FREQ). It provides examples of using PROC CORR to generate a correlation matrix and scatter plot for bivariate relationships. PROC FREQ is demonstrated through a 2x3 cross tabulation and chi-square test to examine potential gender differences in attitudes. Additional concepts reviewed include partial correlation, missing data handling, variance/covariance matrices, and the chi-square distribution.
The document discusses the scientific study of the biological basis of consciousness. It describes how scientists are now actively investigating this topic that was traditionally in the domain of philosophy. Some insights have come from studying neurological patients whose injuries altered their consciousness. However, current research can only provide fragmented pieces of the consciousness puzzle and few address the most enigmatic aspect of human consciousness - the sense of self. Scientists hope to learn not just the biological basis but also why consciousness exists by studying its development and presence in other species.