0% found this document useful (0 votes)
133 views2 pages

Regression in Open Office/ Libre Office: The Linear Regression Equation

Regression analysis can be performed in OpenOffice/LibreOffice using two main methods: 1) Explicitly specifying the slope and intercept using SLOPE and INTERCEPT functions for simple linear regression. Depending on the type of regression (linear, exponential, logarithmic), the appropriate functions are used. 2) Using the LINEST function, which returns an array of regression coefficients and can be used for multiple linear regression with multiple independent variables. The LINEST function requires marking the "Array" checkbox and returns statistics for the best-fit straight line through the data.

Uploaded by

debojit.das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views2 pages

Regression in Open Office/ Libre Office: The Linear Regression Equation

Regression analysis can be performed in OpenOffice/LibreOffice using two main methods: 1) Explicitly specifying the slope and intercept using SLOPE and INTERCEPT functions for simple linear regression. Depending on the type of regression (linear, exponential, logarithmic), the appropriate functions are used. 2) Using the LINEST function, which returns an array of regression coefficients and can be used for multiple linear regression with multiple independent variables. The LINEST function requires marking the "Array" checkbox and returns statistics for the best-fit straight line through the data.

Uploaded by

debojit.das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Regression in Open Office/ Libre Office

In Open Office (OO) there are several ways to compute a regression equation. The first method is
providing explicitly the slope and intercept while the second method is supplying all regression
coefficients simultaneously, including multiple regression. Both methods can be used by writing OO
code or by point-and-click.
1. The first method is suitable for simple linear regression and uses the SLOPE and INTERCEPT
functions, which will give you the slope and the intercept of the regression line. Depending on
the regression type, such as linear, exponential, or logarithmic, you should use the following OO
code:
The linear regression equation
The linear regression follows the equation y=m*x+b.
m = SLOPE(Data_Y;Data_X)
b = INTERCEPT(Data_Y ;Data_X)
Calculate the coefficient of determination by
r = RSQ(Data_Y;Data_X)

The logarithm regression equation


The logarithm regression follows the equation y=a*ln(x)+b.
a = SLOPE(Data_Y;LN(Data_X))
b = INTERCEPT(Data_Y ;LN(Data_X))
r = RSQ(Data_Y;LN(Data_X))

The exponential regression equation


The exponential regression follows the equation y=b*exp(a*x).
a = SLOPE(LN(Data_Y);Data_X)
b = EXP(INTERCEPT(LN(Data_Y);Data_X))

2. The second method is using LINEST function. LINEST returns a table of statistics for a straight
line that best fits a data set. The LINEST fucntion therefore, is an array function, which returns
an array of parameters extracted from the X-Y data. The material below uses the example from
the OpenOffice Cal Tips website located at http://www.openofficetips.com. The LINEST function
can be accessed by typing it inside a cell after the = sign or by clicking on the function wizard.
The syntax for LINEST command is:
LINEST(data_Y; data_X; linearType; stats)
data_Y is a single row or column range specifying the y coordinates in a set of data
points.
data_X is a corresponding single row or column range specifying the x coordinates. If
data_X is omitted it defaults to 1, 2, 3, ..., n. If there is more than one set of variables
data_X may be a range with corresponding multiple rows or columns.
LINEST finds a straight line y = a + bx that best fits the data, using linear regression (the
"least squares" method). With more than one set of variables the straight line is of the
form y = a + b1x1 + b2x2 ... + bnxn.

If linearType is FALSE the straight line found is forced to pass through the origin (the
constant a is zero; y = bx). If omitted, linearType defaults to TRUE (the line is not
forced through the origin).
If stats is omitted or FALSE only the top line of the statistics table is returned. If TRUE
the entire table is returned.

NOTE: For the LINEST function to work, you must have marked the Array check box in the Function
Wizard.

You might also like