Lines Matching refs:K

2401     SCSIZE K = 0, N = 0; // K=number of variables X, N=number of data samples  in CalulateRGPRKP()  local
2402 if ( !CheckMatrix(_bRKP,nCase,nCX,nCY,nRX,nRY,K,N,pMatX,pMatY) ) in CalulateRGPRKP()
2409 if ( (bConstant && (N<K+1)) || (!bConstant && (N<K)) || (N<1) || (K<1) ) in CalulateRGPRKP()
2417 pResMat = GetNewMat(K+1,5); in CalulateRGPRKP()
2419 pResMat = GetNewMat(K+1,1); in CalulateRGPRKP()
2428 for (SCSIZE i=2; i<K+1; i++) in CalulateRGPRKP()
2510 double fFstatistic = (fSSreg / static_cast<double>(K)) in CalulateRGPRKP()
2546 ScMatrixRef pMeans = GetNewMat(K, 1); // mean of each column in CalulateRGPRKP()
2552 ScMatrixRef pSlopes = GetNewMat(1,K); // from b1 to bK in CalulateRGPRKP()
2560 lcl_CalculateColumnMeans(pMatX, pMeans, K, N); in CalulateRGPRKP()
2561 lcl_CalculateColumnsDelta(pMatX, pMeans, K, N); in CalulateRGPRKP()
2563 if (!lcl_CalculateQRdecomposition(pMatX, aVecR, K, N)) in CalulateRGPRKP()
2571 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalulateRGPRKP()
2579 for (SCSIZE col = 0; col < K; col++) in CalulateRGPRKP()
2585 for (SCSIZE col = 0; col < K ; col++) in CalulateRGPRKP()
2589 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, false); in CalulateRGPRKP()
2592 fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalulateRGPRKP()
2594 pResMat->PutDouble(_bRKP ? exp(fIntercept) : fIntercept, K, 0 ); in CalulateRGPRKP()
2595 for (SCSIZE i = 0; i < K; i++) in CalulateRGPRKP()
2597 : pSlopes->GetDouble(i) , K-1-i, 0); in CalulateRGPRKP()
2607 lcl_ApplyUpperRightTriangle(pMatX, aVecR, pSlopes, pMatZ, K, false); in CalulateRGPRKP()
2609 for (SCSIZE colp1 = K; colp1 > 0; colp1--) in CalulateRGPRKP()
2621 double fDegreesFreedom =static_cast<double>( (bConstant) ? N-K-1 : N-K ); in CalulateRGPRKP()
2632 for (SCSIZE i=0; i<K; i++) in CalulateRGPRKP()
2633 pResMat->PutDouble(0.0, K-1-i, 1); in CalulateRGPRKP()
2637 pResMat->PutDouble(0.0, K, 1); //SigmaIntercept in CalulateRGPRKP()
2639 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2646 double fFstatistic = (fSSreg / static_cast<double>(K)) in CalulateRGPRKP()
2663 for (SCSIZE col = 0; col < K; col++) in CalulateRGPRKP()
2666 pMatZ->FillDouble(0.0,0,0,0,K-1); // Z = unit vector e in CalulateRGPRKP()
2669 lcl_SolveWithLowerLeftTriangle(pMatX, aVecR, pMatZ, K, false); in CalulateRGPRKP()
2671 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pMatZ, K, false); in CalulateRGPRKP()
2674 pResMat->PutDouble(fSigmaSlope, K-1-col, 1); in CalulateRGPRKP()
2678 fPart = lcl_GetSumProduct(pMeans, pMatZ, K); in CalulateRGPRKP()
2686 pResMat->PutDouble(fSigmaIntercept, K, 1); in CalulateRGPRKP()
2690 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2703 ScMatrixRef pMeans = GetNewMat(1, K); // mean of each row in CalulateRGPRKP()
2709 ScMatrixRef pSlopes = GetNewMat(K,1); // from b1 to bK in CalulateRGPRKP()
2717 lcl_CalculateRowMeans(pMatX, pMeans, N, K); in CalulateRGPRKP()
2718 lcl_CalculateRowsDelta(pMatX, pMeans, N, K); in CalulateRGPRKP()
2721 if (!lcl_TCalculateQRdecomposition(pMatX, aVecR, K, N)) in CalulateRGPRKP()
2730 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalulateRGPRKP()
2738 for (SCSIZE row = 0; row < K; row++) in CalulateRGPRKP()
2744 for (SCSIZE col = 0; col < K ; col++) in CalulateRGPRKP()
2748 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, true); in CalulateRGPRKP()
2751 fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalulateRGPRKP()
2753 pResMat->PutDouble(_bRKP ? exp(fIntercept) : fIntercept, K, 0 ); in CalulateRGPRKP()
2754 for (SCSIZE i = 0; i < K; i++) in CalulateRGPRKP()
2756 : pSlopes->GetDouble(i) , K-1-i, 0); in CalulateRGPRKP()
2766 lcl_ApplyUpperRightTriangle(pMatX, aVecR, pSlopes, pMatZ, K, true); in CalulateRGPRKP()
2768 for (SCSIZE rowp1 = K; rowp1 > 0; rowp1--) in CalulateRGPRKP()
2780 double fDegreesFreedom =static_cast<double>( (bConstant) ? N-K-1 : N-K ); in CalulateRGPRKP()
2791 for (SCSIZE i=0; i<K; i++) in CalulateRGPRKP()
2792 pResMat->PutDouble(0.0, K-1-i, 1); in CalulateRGPRKP()
2796 pResMat->PutDouble(0.0, K, 1); //SigmaIntercept in CalulateRGPRKP()
2798 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2805 double fFstatistic = (fSSreg / static_cast<double>(K)) in CalulateRGPRKP()
2823 for (SCSIZE row = 0; row < K; row++) in CalulateRGPRKP()
2826 pMatZ->FillDouble(0.0,0,0,K-1,0); // Z = unit vector e in CalulateRGPRKP()
2829 lcl_SolveWithLowerLeftTriangle(pMatX, aVecR, pMatZ, K, true); in CalulateRGPRKP()
2831 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pMatZ, K, true); in CalulateRGPRKP()
2834 pResMat->PutDouble(fSigmaSlope, K-1-row, 1); in CalulateRGPRKP()
2837 fPart = lcl_GetSumProduct(pMeans, pMatZ, K); in CalulateRGPRKP()
2845 pResMat->PutDouble(fSigmaIntercept, K, 1); in CalulateRGPRKP()
2849 pResMat->PutString(ScGlobal::GetRscString(STR_NV_STR), K, 1); in CalulateRGPRKP()
2934 SCSIZE K = 0, N = 0; // K=number of variables X, N=number of data samples in CalculateTrendGrowth() local
2935 if ( !CheckMatrix(_bGrowth,nCase,nCX,nCY,nRX,nRY,K,N,pMatX,pMatY) ) in CalculateTrendGrowth()
2942 if ( (bConstant && (N<K+1)) || (!bConstant && (N<K)) || (N<1) || (K<1) ) in CalculateTrendGrowth()
2961 if ((nCase == 2 && K != nCXN) || (nCase == 3 && K != nRXN)) in CalculateTrendGrowth()
3057 ScMatrixRef pMeans = GetNewMat(K, 1); // mean of each column in CalculateTrendGrowth()
3058 ScMatrixRef pSlopes = GetNewMat(1,K); // from b1 to bK in CalculateTrendGrowth()
3066 lcl_CalculateColumnMeans(pMatX, pMeans, K, N); in CalculateTrendGrowth()
3067 lcl_CalculateColumnsDelta(pMatX, pMeans, K, N); in CalculateTrendGrowth()
3069 if (!lcl_CalculateQRdecomposition(pMatX, aVecR, K, N)) in CalculateTrendGrowth()
3077 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalculateTrendGrowth()
3085 for (SCSIZE col = 0; col < K; col++) in CalculateTrendGrowth()
3091 for (SCSIZE col = 0; col < K ; col++) in CalculateTrendGrowth()
3095 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, false); in CalculateTrendGrowth()
3098 lcl_MFastMult(pMatNewX,pSlopes,pResMat,nRXN,K,1); in CalculateTrendGrowth()
3101 double fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalculateTrendGrowth()
3116 ScMatrixRef pMeans = GetNewMat(1, K); // mean of each row in CalculateTrendGrowth()
3117 ScMatrixRef pSlopes = GetNewMat(K,1); // row from b1 to bK in CalculateTrendGrowth()
3125 lcl_CalculateRowMeans(pMatX, pMeans, N, K); in CalculateTrendGrowth()
3126 lcl_CalculateRowsDelta(pMatX, pMeans, N, K); in CalculateTrendGrowth()
3128 if (!lcl_TCalculateQRdecomposition(pMatX, aVecR, K, N)) in CalculateTrendGrowth()
3136 for (SCSIZE row=0; row < K && !bIsSingular; row++) in CalculateTrendGrowth()
3144 for (SCSIZE row = 0; row < K; row++) in CalculateTrendGrowth()
3150 for (SCSIZE col = 0; col < K ; col++) in CalculateTrendGrowth()
3154 lcl_SolveWithUpperRightTriangle(pMatX, aVecR, pSlopes, K, true); in CalculateTrendGrowth()
3157 lcl_MFastMult(pSlopes,pMatNewX,pResMat,1,K,nCXN); in CalculateTrendGrowth()
3160 double fIntercept = fMeanY - lcl_GetSumProduct(pMeans,pSlopes,K); in CalculateTrendGrowth()