You've already forked lazarus-ccr
LazStats: Integrate charts of WLSUnit into tabs on the WLSFrm
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7772 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -53,7 +53,7 @@ procedure EffectCode(GridCol, min, max : integer;
|
||||
procedure MReg(NoIndep: integer; const IndepCols: IntDyneVec; DepCol: integer;
|
||||
const RowLabels: StrDyneVec;
|
||||
const Means, Variances, StdDevs, BWeights, BetaWeights, BStdErrs, Bttests, tProbs: DblDyneVec;
|
||||
out R2, StdErrEst: double; NCases: integer; out ErrorCode: boolean;
|
||||
out R2, StdErrEst: double; out NCases: integer; out ErrorCode: boolean;
|
||||
PrintAll: boolean; AReport: TStrings);
|
||||
|
||||
procedure Dynnonsymroots(var a : DblDyneMat; nv : integer;
|
||||
@ -622,10 +622,26 @@ begin
|
||||
coef := nil;
|
||||
end;
|
||||
|
||||
{ Calculates a multiple regression on data in the mainform's grid
|
||||
|
||||
NoIndep ..... Count of independent variables
|
||||
IndepCols ... Grid column indices of the independent variables
|
||||
DepCol ...... Grid column index of the dependent variable
|
||||
RowLabels ... Names of the independent variables (they will be displayed in the
|
||||
printout of matrices as rowlabels.
|
||||
Means ....... Mean value for each independent variable
|
||||
Variances ... Variance of each independent variable
|
||||
StdDevs ..... Standard deviations of each independent variable
|
||||
|
||||
NCases ...... Count of valid cases found in the grid
|
||||
ErrorCode ... if true, an error has occured during the calculations
|
||||
PrintAll .... if true, intermediate matrices and vectors are written to the report
|
||||
AReport ..... a string list to which the report is written.
|
||||
}
|
||||
procedure MReg(NoIndep: integer; const IndepCols: IntDyneVec; DepCol: integer;
|
||||
const RowLabels: StrDyneVec;
|
||||
const Means, Variances, StdDevs, BWeights, BetaWeights, BStdErrs, Bttests, tProbs: DblDyneVec;
|
||||
out R2, StdErrEst: double; NCases: integer; out ErrorCode: boolean;
|
||||
out R2, StdErrEst: double; out NCases: integer; out ErrorCode: boolean;
|
||||
PrintAll: boolean; AReport: TStrings);
|
||||
var
|
||||
i, j, N: integer;
|
||||
@ -718,8 +734,8 @@ begin
|
||||
AReport.Add(DIVIDER_SMALL);
|
||||
|
||||
// augment the matrix
|
||||
for i := 1 to NCases do
|
||||
X[i-1, NoIndep] := 1.0;
|
||||
for i := 0 to NCases-1 do
|
||||
X[i, NoIndep] := 1.0;
|
||||
Y[NCases] := 1.0;
|
||||
|
||||
// get transpose of augmented X matrix
|
||||
|
Reference in New Issue
Block a user