Lines Matching refs:K

2400     SCSIZE K = 0, N = 0; // K=number of variables X, N=number of data samples  in CalulateRGPRKP()  local
2401 if ( !CheckMatrix(_bRKP,nCase,nCX,nCY,nRX,nRY,K,N,pMatX,pMatY) ) in CalulateRGPRKP()
2408 if ( (bConstant && (N<K+1)) || (!bConstant && (N<K)) || (N<1) || (K<1) ) in CalulateRGPRKP()
2416 pResMat = GetNewMat(K+1,5); in CalulateRGPRKP()
2418 pResMat = GetNewMat(K+1,1); in CalulateRGPRKP()
2427 for (SCSIZE i=2; i<K+1; i++) in CalulateRGPRKP()
2509 double fFstatistic = (fSSreg / static_cast<double>(K)) in CalulateRGPRKP()
2545 ScMatrixRef pMeans = GetNewMat(K, 1); // mean of each column in CalulateRGPRKP()
2551 ScMatrixRef pSlopes = GetNewMat(1,K); // from b1 to bK in CalulateRGPRKP()
2559 lcl_CalculateColumnMeans(pMatX, pMeans, K, N); in CalulateRGPRKP()
2560 lcl_CalculateColumnsDelta(pMatX, pMeans, K, N); in CalulateRGPRKP()
2562 if (!lcl_CalculateQRdecomposition(pMatX, aVecR, K, N)) in CalulateRGPRKP()
2570 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalulateRGPRKP()
2578 for (SCSIZE col = 0; col < K; col++) in CalulateRGPRKP()
2584 for (SCSIZE col = 0; col < K ; col++) in CalulateRGPRKP()
2588 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, false); in CalulateRGPRKP()
2591 fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalulateRGPRKP()
2593 pResMat->PutDouble(_bRKP ? exp(fIntercept) : fIntercept, K, 0 ); in CalulateRGPRKP()
2594 for (SCSIZE i = 0; i < K; i++) in CalulateRGPRKP()
2596 : pSlopes->GetDouble(i) , K-1-i, 0); in CalulateRGPRKP()
2606 lcl_ApplyUpperRightTriangle(pMatX, aVecR, pSlopes, pMatZ, K, false); in CalulateRGPRKP()
2608 for (SCSIZE colp1 = K; colp1 > 0; colp1--) in CalulateRGPRKP()
2620 double fDegreesFreedom =static_cast<double>( (bConstant) ? N-K-1 : N-K ); in CalulateRGPRKP()
2631 for (SCSIZE i=0; i<K; i++) in CalulateRGPRKP()
2632 pResMat->PutDouble(0.0, K-1-i, 1); in CalulateRGPRKP()
2636 pResMat->PutDouble(0.0, K, 1); //SigmaIntercept in CalulateRGPRKP()
2638 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2645 double fFstatistic = (fSSreg / static_cast<double>(K)) in CalulateRGPRKP()
2662 for (SCSIZE col = 0; col < K; col++) in CalulateRGPRKP()
2665 pMatZ->FillDouble(0.0,0,0,0,K-1); // Z = unit vector e in CalulateRGPRKP()
2668 lcl_SolveWithLowerLeftTriangle(pMatX, aVecR, pMatZ, K, false); in CalulateRGPRKP()
2670 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pMatZ, K, false); in CalulateRGPRKP()
2673 pResMat->PutDouble(fSigmaSlope, K-1-col, 1); in CalulateRGPRKP()
2677 fPart = lcl_GetSumProduct(pMeans, pMatZ, K); in CalulateRGPRKP()
2685 pResMat->PutDouble(fSigmaIntercept, K, 1); in CalulateRGPRKP()
2689 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2702 ScMatrixRef pMeans = GetNewMat(1, K); // mean of each row in CalulateRGPRKP()
2708 ScMatrixRef pSlopes = GetNewMat(K,1); // from b1 to bK in CalulateRGPRKP()
2716 lcl_CalculateRowMeans(pMatX, pMeans, N, K); in CalulateRGPRKP()
2717 lcl_CalculateRowsDelta(pMatX, pMeans, N, K); in CalulateRGPRKP()
2720 if (!lcl_TCalculateQRdecomposition(pMatX, aVecR, K, N)) in CalulateRGPRKP()
2729 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalulateRGPRKP()
2737 for (SCSIZE row = 0; row < K; row++) in CalulateRGPRKP()
2743 for (SCSIZE col = 0; col < K ; col++) in CalulateRGPRKP()
2747 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, true); in CalulateRGPRKP()
2750 fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalulateRGPRKP()
2752 pResMat->PutDouble(_bRKP ? exp(fIntercept) : fIntercept, K, 0 ); in CalulateRGPRKP()
2753 for (SCSIZE i = 0; i < K; i++) in CalulateRGPRKP()
2755 : pSlopes->GetDouble(i) , K-1-i, 0); in CalulateRGPRKP()
2765 lcl_ApplyUpperRightTriangle(pMatX, aVecR, pSlopes, pMatZ, K, true); in CalulateRGPRKP()
2767 for (SCSIZE rowp1 = K; rowp1 > 0; rowp1--) in CalulateRGPRKP()
2779 double fDegreesFreedom =static_cast<double>( (bConstant) ? N-K-1 : N-K ); in CalulateRGPRKP()
2790 for (SCSIZE i=0; i<K; i++) in CalulateRGPRKP()
2791 pResMat->PutDouble(0.0, K-1-i, 1); in CalulateRGPRKP()
2795 pResMat->PutDouble(0.0, K, 1); //SigmaIntercept in CalulateRGPRKP()
2797 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2804 double fFstatistic = (fSSreg / static_cast<double>(K)) in CalulateRGPRKP()
2822 for (SCSIZE row = 0; row < K; row++) in CalulateRGPRKP()
2825 pMatZ->FillDouble(0.0,0,0,K-1,0); // Z = unit vector e in CalulateRGPRKP()
2828 lcl_SolveWithLowerLeftTriangle(pMatX, aVecR, pMatZ, K, true); in CalulateRGPRKP()
2830 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pMatZ, K, true); in CalulateRGPRKP()
2833 pResMat->PutDouble(fSigmaSlope, K-1-row, 1); in CalulateRGPRKP()
2836 fPart = lcl_GetSumProduct(pMeans, pMatZ, K); in CalulateRGPRKP()
2844 pResMat->PutDouble(fSigmaIntercept, K, 1); in CalulateRGPRKP()
2848 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2933 SCSIZE K = 0, N = 0; // K=number of variables X, N=number of data samples in CalculateTrendGrowth() local
2934 if ( !CheckMatrix(_bGrowth,nCase,nCX,nCY,nRX,nRY,K,N,pMatX,pMatY) ) in CalculateTrendGrowth()
2941 if ( (bConstant && (N<K+1)) || (!bConstant && (N<K)) || (N<1) || (K<1) ) in CalculateTrendGrowth()
2960 if ((nCase == 2 && K != nCXN) || (nCase == 3 && K != nRXN)) in CalculateTrendGrowth()
3056 ScMatrixRef pMeans = GetNewMat(K, 1); // mean of each column in CalculateTrendGrowth()
3057 ScMatrixRef pSlopes = GetNewMat(1,K); // from b1 to bK in CalculateTrendGrowth()
3065 lcl_CalculateColumnMeans(pMatX, pMeans, K, N); in CalculateTrendGrowth()
3066 lcl_CalculateColumnsDelta(pMatX, pMeans, K, N); in CalculateTrendGrowth()
3068 if (!lcl_CalculateQRdecomposition(pMatX, aVecR, K, N)) in CalculateTrendGrowth()
3076 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalculateTrendGrowth()
3084 for (SCSIZE col = 0; col < K; col++) in CalculateTrendGrowth()
3090 for (SCSIZE col = 0; col < K ; col++) in CalculateTrendGrowth()
3094 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, false); in CalculateTrendGrowth()
3097 lcl_MFastMult(pMatNewX,pSlopes,pResMat,nRXN,K,1); in CalculateTrendGrowth()
3100 double fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalculateTrendGrowth()
3115 ScMatrixRef pMeans = GetNewMat(1, K); // mean of each row in CalculateTrendGrowth()
3116 ScMatrixRef pSlopes = GetNewMat(K,1); // row from b1 to bK in CalculateTrendGrowth()
3124 lcl_CalculateRowMeans(pMatX, pMeans, N, K); in CalculateTrendGrowth()
3125 lcl_CalculateRowsDelta(pMatX, pMeans, N, K); in CalculateTrendGrowth()
3127 if (!lcl_TCalculateQRdecomposition(pMatX, aVecR, K, N)) in CalculateTrendGrowth()
3135 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalculateTrendGrowth()
3143 for (SCSIZE row = 0; row < K; row++) in CalculateTrendGrowth()
3149 for (SCSIZE col = 0; col < K ; col++) in CalculateTrendGrowth()
3153 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, true); in CalculateTrendGrowth()
3156 lcl_MFastMult(pSlopes,pMatNewX,pResMat,1,K,nCXN); in CalculateTrendGrowth()
3159 double fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalculateTrendGrowth()