Skip to content
Rafat Hussain edited this page Apr 22, 2015 · 8 revisions

REG Class and Functions

reg_object obj = reg_init(N,p); // Initialize REG object

// N - Size of Data Vectors (All vectors are assumed to have same length)
// p - Number of Regression Variables (>= 2). In the simple Univariate case( Y ~ b0 + b1 * X + u) , p = 2 
For multiple regressions p > 2

REG Object Parameters

        int N;// Size of Data vectors
	int p;// Total Number of Parameters (>= 2)
	double alpha;// Confidence Interval For Parameters And Residual Variance (1.0 - obj->alpha) * 100
	double sigma;// Residual variance
	double sigma_lower;// Residual variance Lower Limit
	double sigma_upper;// Residual variance Upper Limit
	double r2;// R-Squared
	double r2adj;// Adjusted R-Squared
	double R2[2];// R2[0] = r2, R2[1] = r2adj
	int df;// degree of freedom
	double TSS;// Total Sum Of Squares
	double ESS;// Expected Sum Of Squares
	double RSS;// Residual Sum Of Squares
	int df_ESS;// df due to Regression
	int df_RSS;// df due to Residuals
	double FStat;// F Statistics
	double PVal;// P Values (F)
	bparam beta[1]; // Regression Parameters object beta ( p Parameters) . See below

Regression Parameters beta

	double value;// Parameter Value. ith Parameter value can be accessed by [ (obj->beta+i)->value ]
	double lower;// Parameter Lower Limit [ (obj->beta+i)->lower ]
	double upper;// Parameter Upper Limit [ (obj->beta+i)->upper ]
        double stdErr;// Parameter Standard Error. [ (obj->beta+i)->stdErr ]

Clone this wiki locally