somdat 发表于 2010-10-14 19:53 
用sas建立了线性回归模型,如何在程序中调用各自变量的系数,希望各位高手能指点一下
There are several ways doing it.
1) you may pass the coefs to a set of macro variables via a data step call symput and you can refer to/use them in later stages.
2) proc score after the coefs are save into a dataset. Here is the reference of proc score
Overview: SCORE ProcedureThe SCORE procedure multiplies values from two SAS data sets, one containing coefficients (for example, factor-scoring coefficients or regression coefficients) and the other containing raw data to be scored using the coefficients from the first data set. The result of this multiplication is a SAS data set containing linear combinations of the coefficients and the raw data values.
Many statistical procedures output coefficients that PROC SCORE can apply to raw data to produce scores. The new score variable is formed as a linear combination of raw data and scoring coefficients. For each observation in the raw data set, PROC SCORE multiplies the value of a variable in the raw data set by the matching scoring coefficient from the data set of scoring coefficients. This multiplication process is repeated for each variable in the VAR statement. The resulting products are then summed to produce the value of the new score variable. This entire process is repeated for each observation in the raw data set. In other words, PROC SCORE cross multiplies part of one data set with another.
3) you may use a trick to define a weight and score a data set within a regression procedure.
Which way to use depends on your case in practice.