1. Trang chủ
  2. » Tài Chính - Ngân Hàng

SAS/ETS 9.22 User''''s Guide 124 docx

10 186 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 168,22 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

For each variable, a list of variables that depend on it and a list of variables it depends on is given.. Figure 18.89 A Portion of the LISTDEP Output for Klein’s ModelThe MODEL Procedur

Trang 1

Figure 18.88 continued

5 Stmt ASSIGN line 3934 column

7 (1) arg=PRED.y argsave=y

Source Text: /* Plateau part of model */

y = a + b*x0 + c*x0*x0;

Oper * at 3934:16 (30,0,2) * : _temp1 <- b x0 Oper + at 3934:13 (32,0,2) + : _temp2 <- a _temp1 Oper * at 3934:23 (30,0,2) * : _temp3 <- c x0 Oper * at 3934:26 (30,0,2) * : _temp4 <- _temp3 x0 Oper + at 3934:20 (32,0,2) + : PRED.y <- _temp2 _temp4 Oper eeocf at 3934:20 (18,0,1) eeocf : _DER_ <- _DER_

Oper = at 3934:20 (1,0,1) = : @PRED.y/@a <- 1 Oper * at 3934:16 (30,0,2) * : @1dt1_1 <- b @x0/@b Oper + at 3934:16 (32,0,2) + : @1dt1_2 <- x0 @1dt1_1 Oper * at 3934:23 (30,0,2) * : @1dt1_3 <- c @x0/@b Oper * at 3934:26 (30,0,2) * : @1dt1_4 <- @1dt1_3 x0 Oper * at 3934:26 (30,0,2) * : @1dt1_5 <- _temp3 @x0/@b Oper + at 3934:26 (32,0,2) + : @1dt1_6 <- @1dt1_4 @1dt1_5 Oper + at 3934:20 (32,0,2) + : @PRED.y/@b <- @1dt1_2 @1dt1_6 Oper * at 3934:16 (30,0,2) * : @1dt1_8 <- b @x0/@c

Oper * at 3934:23 (30,0,2) * : @1dt1_9 <- c @x0/@c Oper + at 3934:23 (32,0,2) + : @1dt1_10 <- x0 @1dt1_9 Oper * at 3934:26 (30,0,2) * : @1dt1_11 <- @1dt1_10 x0 Oper * at 3934:26 (30,0,2) * : @1dt1_12 <- _temp3 @x0/@c Oper + at 3934:26 (32,0,2) + : @1dt1_13 <- @1dt1_11 @1dt1_12 Oper + at 3934:20 (32,0,2) + : @PRED.y/@c <- @1dt1_8 @1dt1_13

5 Stmt Assign line 3934 column

7 (1) arg=RESID.y argsave=y

Oper - at 3934:7 (33,0,2) - : RESID.y <- PRED.y ACTUAL.y Oper eeocf at 3934:7 (18,0,1) eeocf : _DER_ <- _DER_

Oper = at 3934:7 (1,0,1) = : @RESID.y/@a <- @PRED.y/@a Oper = at 3934:7 (1,0,1) = : @RESID.y/@b <- @PRED.y/@b Oper = at 3934:7 (1,0,1) = : @RESID.y/@c <- @PRED.y/@c

5 Stmt Assign line 3934 column

7 (1) arg=ERROR.y argsave=y

Oper - at 3934:7 (33,0,2) - : ERROR.y <- PRED.y y

Analyzing the Structure of Large Models

PROC MODEL provides several features to aid in analyzing the structure of the model program These features summarize properties of the model in various forms.

The following Klein’s model program is used to introduce the LISTDEP, BLOCK, and GRAPH options.

Trang 2

proc model out=m data=klein listdep graph block;

endogenous c p w i x wsum k y;

exogenous wp g t year;

parms c0-c3 i0-i3 w0-w3;

a: c = c0 + c1 * p + c2 * lag(p) + c3 * wsum;

b: i = i0 + i1 * p + i2 * lag(p) + i3 * lag(k);

c: w = w0 + w1 * x + w2 * lag(x) + w3 * year;

x = c + i + g;

y = c + i + g-t;

p = x-w-t;

k = lag(k) + i;

wsum = w + wp;

id year;

run;

Dependency List

The LISTDEP option produces a dependency list for each variable in the model program For each variable, a list of variables that depend on it and a list of variables it depends on is given The dependency list produced by the example program is shown in Figure 18.89.

Trang 3

Figure 18.89 A Portion of the LISTDEP Output for Klein’s Model

The MODEL Procedure

Dependency Listing For Program Symbol - Dependencies

ERROR.c PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y

RESID.c ERROR.c PRED.i RESID.i ERROR.i RESID.p ERROR.p

Lagged values affect: PRED.c PRED.i

ERROR.w PRED.p RESID.p ERROR.p PRED.wsum RESID.wsum ERROR.wsum

i Current values affect: RESID.i ERROR.i

PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y PRED.k RESID.k ERROR.k

RESID.w ERROR.w RESID.x ERROR.x PRED.p RESID.p ERROR.p

Lagged values affect: PRED.w wsum Current values affect: PRED.c RESID.c

ERROR.c RESID.wsum ERROR.wsum

k Current values affect: RESID.k ERROR.k

Lagged values affect: PRED.i RESID.i ERROR.i PRED.k

y Current values affect: RESID.y ERROR.y

RESID.wsum ERROR.wsum

g Current values affect: PRED.x RESID.x

ERROR.x PRED.y RESID.y ERROR.y

t Current values affect: PRED.y RESID.y

ERROR.y PRED.p RESID.p ERROR.p

PRED.w RESID.w ERROR.w

PRED.c RESID.c ERROR.c

PRED.c RESID.c ERROR.c

PRED.c RESID.c ERROR.c

PRED.c RESID.c ERROR.c

PRED.i RESID.i ERROR.i

PRED.i RESID.i ERROR.i

Trang 4

Figure 18.89 continued

The MODEL Procedure

Dependency Listing For Program Symbol - Dependencies

PRED.i RESID.i ERROR.i

PRED.w RESID.w ERROR.w

PRED.w RESID.w ERROR.w

PRED.w RESID.w ERROR.w

PRED.w RESID.w ERROR.w PRED.c Depends on current values

of: p wsum c0 c1 c2 c3 Depends on lagged values of: p Current values affect: RESID.c ERROR.c RESID.c Depends on current values of:

PRED.c c p wsum c0 c1 c2 c3 ERROR.c Depends on current values of:

PRED.c c p wsum c0 c1 c2 c3 ACTUAL.c Current values affect: RESID.c

ERROR.c PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y

PRED.i Depends on current values

of: p i0 i1 i2 i3 Depends on lagged values of: p k Current values affect: RESID.i ERROR.i RESID.i Depends on current values

of: PRED.i p i i0 i1 i2 i3 Depends on lagged values of: k ERROR.i Depends on current values

of: PRED.i p i i0 i1 i2 i3 Depends on lagged values of: k ACTUAL.i Current values affect: RESID.i ERROR.i

PRED.x RESID.x ERROR.x PRED.y RESID.y ERROR.y PRED.k RESID.k ERROR.k

PRED.w Depends on current values

of: x year w0 w1 w2 w3 Depends on lagged values of: x Current values affect: RESID.w ERROR.w RESID.w Depends on current values of:

PRED.w w x year w0 w1 w2 w3 ERROR.w Depends on current values of:

PRED.w w x year w0 w1 w2 w3 ACTUAL.w Current values affect: RESID.w

ERROR.w PRED.p RESID.p ERROR.p

Trang 5

Figure 18.89 continued

The MODEL Procedure

Dependency Listing For Program Symbol - Dependencies

PRED.x Depends on current values of: c i g

Current values affect: RESID.x ERROR.x RESID.x Depends on current values

of: PRED.x c i x g ERROR.x Depends on current values

of: PRED.x c i x g ACTUAL.x Current values affect: PRED.w

RESID.w ERROR.w RESID.x ERROR.x PRED.p RESID.p ERROR.p

Lagged values affect: PRED.w PRED.y Depends on current values of: c i g t

Current values affect: RESID.y ERROR.y RESID.y Depends on current values

of: PRED.y c i y g t ERROR.y Depends on current values

of: PRED.y c i y g t ACTUAL.y Current values affect: RESID.y ERROR.y PRED.p Depends on current values of: w x t

Current values affect: RESID.p ERROR.p RESID.p Depends on current values

of: PRED.p p w x t ERROR.p Depends on current values

of: PRED.p p w x t ACTUAL.p Current values affect: PRED.c

RESID.c ERROR.c PRED.i RESID.i ERROR.i RESID.p ERROR.p

Lagged values affect: PRED.c PRED.i PRED.k Depends on current values of: i

Depends on lagged values of: k Current values affect: RESID.k ERROR.k RESID.k Depends on current values of: PRED.k i k ERROR.k Depends on current values of: PRED.k i k ACTUAL.k Current values affect: RESID.k ERROR.k

Lagged values affect: PRED.i RESID.i ERROR.i PRED.k PRED.wsum Depends on current values of: w wp

Current values affect:

RESID.wsum ERROR.wsum RESID.wsum Depends on current values

of: PRED.wsum w wsum wp ERROR.wsum Depends on current values

of: PRED.wsum w wsum wp ACTUAL.wsum Current values affect: PRED.c RESID.c

ERROR.c RESID.wsum ERROR.wsum

Trang 6

BLOCK Listing

The BLOCK option prints an analysis of the program variables based on the assignments in the model program The output produced by the example is shown in Figure 18.90.

Figure 18.90 The BLOCK Output for Klein’s Model

The MODEL Procedure Model Structure Analysis (Based on Assignments to Endogenous Model Variables)

Exogenous Variables wp g t year Endogenous Variables c p w i x wsum k y

Block Structure of the System

Block 1 c p w i x wsum

Dependency Structure of the System

Block 1 Depends On All_Exogenous

k Depends On Block 1 All_Exogenous

y Depends On Block 1 All_Exogenous

One use for the block output is to put a model in recursive form Simulations of the model can be done with the SEIDEL method, which is efficient if the model is recursive and if the equations are

in recursive order By examining the block output, you can determine how to reorder the model equations for the most efficient simulation.

Adjacency Graph

The GRAPH option displays the same information as the BLOCK option with the addition of an adjacency graph An X in a column in an adjacency graph indicates that the variable associated with the row depends on the variable associated with the column The output produced by the example is shown in Figure 18.91.

The first and last graphs are straightforward The middle graph represents the dependencies of the nonexogenous variables after transitive closure has been performed (that is, A depends on B, and B depends on C, so A depends on C) The preceding transitive closure matrix indicates that K and Y

do not directly or indirectly depend on each other.

Trang 7

Figure 18.91 The GRAPH Output for Klein’s Model

Adjacency Matrix for Graph of System

Variable c p w i x m k y p g t r

* * * *

wsum X X X

wp * X

year * X

(Note: * = Exogenous Variable.) Transitive Closure Matrix of Sorted System

w s u Block Variable c p w i x m k y

Trang 8

Figure 18.91 continued

Adjacency Matrix for Graph of System Including Lagged Impacts

Block Variable c p w i x m k y p g t r

* * * *

wp * X

year * X

(Note: * = Exogenous Variable.)

Examples: MODEL Procedure

Example 18.1: OLS Single Nonlinear Equation

This example illustrates the use of the MODEL procedure for nonlinear ordinary least squares (OLS) regression The model is a logistic growth curve for the population of the United States The data is the population in millions recorded at ten-year intervals starting in 1790 and ending in 2000 For an explanation of the starting values given by the START= option, see the section “Troubleshooting Convergence Problems” on page 1080 Portions of the output from the following statements are shown in Output 18.1.1 through Output 18.1.3.

title 'Logistic Growth Curve Model of U.S Population';

data uspop;

input pop :6.3 @@;

retain year 1780;

year=year+10;

label pop='U.S Population in Millions';

datalines;

3929 5308 7239 9638 12866 17069 23191 31443 39818 50155

62947 75994 91972 105710 122775 131669 151325 179323 203211

226542 248710

;

Trang 9

proc model data=uspop;

label a = 'Maximum Population'

b = 'Location Parameter'

c = 'Initial Growth Rate';

pop = a / ( 1 + exp( b - c * (year-1790) ) );

fit pop start=(a 1000 b 5.5 c 02) / out=resid outresid; run;

Output 18.1.1 Logistic Growth Curve Model Summary

Logistic Growth Curve Model of U.S Population

The MODEL Procedure

Model Summary

Model Variables 1

Number of Statements 1

Model Variables pop Parameters(Value) a(1000) b(5.5) c(0.02)

Equations pop

The Equation to Estimate is

pop = F(a, b, c)

Output 18.1.2 Logistic Growth Curve Estimation Summary

Logistic Growth Curve Model of U.S Population

The MODEL Procedure OLS Estimation Summary

Data Set Options

DATA= USPOP OUT= RESID

Minimization Summary

Trang 10

Output 18.1.2 continued

Final Convergence Criteria

Objective Value 16.45884

Observations Processed

Solved 21

Output 18.1.3 Logistic Growth Curve Estimates

Logistic Growth Curve Model of U.S Population

The MODEL Procedure

Nonlinear OLS Summary of Residual Errors

Nonlinear OLS Parameter Estimates

Parameter Estimate Std Err t Value Pr > |t| Label

a 387.9307 30.0404 12.91 <.0001 Maximum Population

b 3.990385 0.0695 57.44 <.0001 Location Parameter

c 0.022703 0.00107 21.22 <.0001 Initial Growth Rate

The adjusted R2value indicates the model fits the data well There are only 21 observations and the model is nonlinear, so significance tests on the parameters are only approximate The significance tests and associated approximate probabilities indicate that all the parameters are significantly different from 0.

The FIT statement included the options OUT=RESID and OUTRESID so that the residuals from the estimation are saved to the data set RESID The residuals are plotted to check for heteroscedasticity

by using PROC SGPLOT as follows.

title2 "Residuals Plot";

proc sgplot data=resid;

refline 0;

scatter x=year y=pop / markerattrs=(symbol=circlefilled);

xaxis values=(1780 to 2000 by 20);

run;

Ngày đăng: 02/07/2014, 15:20

TỪ KHÓA LIÊN QUAN