![]() |
MATRIX FITName:
<SUBSET/EXCEPT/FOR qualification> where <mat> is a matrix for which the fits are to be generated; <x> is a response variable that contains the independent variable for the fit; <a0> is a variable where the intercepts from the fits are saved; <a0sd> is a variable where the standard deviations of the intercepts from the fits are saved; <a1> is a variable where the slopes from the fits are saved; <a1sd> is a variable where the standard deviations of the slopes from the fits are saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional and rarely used in this context. With this syntax, each column of <mat> is used as the dependent variable in a linear least squares fit with <x> as the independent variable. The number of rows in <mat> must be the same as the number of rows in <x>
<SUBSET/EXCEPT/FOR qualification> where <mat> is a matrix for which the fits are to be generated; <x> is a response variable that contains the independent variable for the fit; <a0> is a variable where the intercepts from the fits are saved; <a0sd> is a variable where the standard deviations of the intercepts from the fits are saved; <a1> is a variable where the slopes from the fits are saved; <a1sd> is a variable where the standard deviations of the slopes from the fits are saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional and rarely used in this context. With this syntax, each row of <mat> is used as the dependent variable in a linear least squares fit with <x> as the independent variable. The number of columns in <mat> must be the same as the number of rows in <x>
dimension 500 columns skip 25 read gear.dat y tag . let tagdist = distinct tag let tagdist = sort tagdist let ngroup = size tagdist . loop for k = 1 1 ngroup let aval = tagdist(k) let y^k = y retain y^k subset tag = aval end of loop . let nrow = 10 let x = sequence 1 1 nrow let m = create matrix y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 set write decimals 5 . let b0 b1 b0sd b1sd = matrix column fit m x . print b0 b1 b0sd b1sd pause . let mt = matrix transpose m let c0 c1 c0sd c1sd = matrix row fit mt x print c0 c1 c0sd c1sd
Date created: 9/8/2010 |