SAS Program for Analyzing Car MPG Data using Mixed Procedure - Prof. Mervyn G. Marasinghe, Study notes of Statistics

An example of sas programming code for inputting and analyzing car fuel efficiency (mpg) data using the mixed procedure. The data is organized by driver and car, and the analysis includes type 3 analysis of variance and covariance parameter estimates to determine the significance of driver, car, and driver-car interaction on mpg. The sas output displays the results.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-ue2
koofers-user-ue2 🇺🇸

9 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Example F6
SAS Program
data auto;
input driver 1. @;
do car=1 to 5;
input mpg @;
output;
end;
datalines;
1 25.3 28.9 24.8 28.4 27.1
1 25.2 30.0 25.1 27.9 26.6
2 33.6 36.7 31.7 35.6 33.7
2 32.9 36.5 31.9 35.0 33.9
3 27.7 30.7 26.9 29.7 29.2
3 28.5 30.4 26.3 30.2 28.9
4 29.2 32.4 27.7 31.8 30.3
4 29.3 32.4 28.9 30.7 29.9
;
run;
proc mixed data=auto noclprint noinfo method=type3 cl;
class driver car;
model mpg = /;
random driver car driver*car;
run;
pf3

Partial preview of the text

Download SAS Program for Analyzing Car MPG Data using Mixed Procedure - Prof. Mervyn G. Marasinghe and more Study notes Statistics in PDF only on Docsity!

Example F6SAS Program data^

auto;

input

driver

1.^ @;

do^ car=

1 to^

input

mpg @;

output;end;

datalines; 1 25.

; run ; proc^

mixed

data=auto noclprint

noinfo

method=type

cl;

class

driver car;

model

mpg = /;

random

driver car driver*car;

run ;

SAS Output

The^ SAS

System

The^ Mixed ProcedureType 3 Analysis

of^ VarianceSum^ of

Source

DF^

Squares

Mean Square

driver

car^

driver*car

Residual

Type^ 3 Analysis

of^ Variance

Error

Source

Expected

Mean Square

Error^ Term^

DF^ F^

Value

driver

Var(Residual) +

2 Var(driver*car)

MS(driver*car)

+^10 Var(driver) car^

Var(Residual) +

2 Var(driver*car)

MS(driver*car)

+^ 8 Var(car) driver*car

Var(Residual) +

2 Var(driver*car)

MS(Residual)

Residual

Var(Residual)

.^

.^

Type^ 3 Analysisof^ VarianceSource^

Pr >^ F driver

car^

driver*car

Residual