Description Usage Arguments Value See Also Examples
This function returns parameters of least square equation given column matrices of independent variables and dependent matrices.
1  | least_squares(xmat, ymat)
 | 
xmat | 
 Independent matrix (dimesions, either n by 2 or n by 3), where n is number of sample points. Matrix returned by   | 
ymat | 
 Dependent matrix (dimesions, n by 1), where n is number of sample points.  | 
A matrix with components:
ycp | 
 y-value at the change-point  | 
Slope1 | 
 leftmost slope if B is 3 by 1 matrix. Otherwise, non-zero slope.  | 
Slope2 | 
 rightmost slope if if B is 3 by 1 matrix.  | 
1 2 3 4 5 6  | util = subset(unretrofit_utility, unretrofit_utility$bdbid == 'f3acce86'
			& unretrofit_utility$energy_type == 'Elec')
temp = sort_matrix(util$OAT,util$usage)
x_split = splitter('4P', temp$x, 51)
xmat = make_matrix(x_split)
B = least_squares(xmat, temp$y)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.