Description Usage Arguments Details See Also
View source: R/util-regression.R
convienience reordering of regressor.piecewise
putting the bins first for apply style calls...
break a vector out for continuous piecewise regression (i.e. the fitted segments will join eachother at each end) into a matrix whose row totals are the original values, but whose columns divide the value across a set of bins, so 82 across bins with boundaries c(50,60,65,70,80,90) becomes the row 50,10,5,5,10,2,0, which sums to 82... This is very useful for finding rough change points in thermal response as is expected for buildings with clear setpoints
1 | piecewise.regressor(bins, regressor, ...)
|
bins |
- numerical arry whose values are the break points defining the piecewise regressors |
regressor |
The single array of regressor values to be broken out into piecewise columns. |
diverge |
- Defautl FALSE: Whether the first column contains the distance of the value from the bottom change point (rather than from 0) |
This can be used in an apply
setting to run a parametric grid search of break points.
TODO: This can create a column of zeros, which should break the regression so we might need to prune the columns when we're done and keep track of which bins are in play when comparing across regressions
regressor.piecewise
for 'normal' syntax
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.