Description Usage Arguments Details Note See Also Examples
This function returns parameters, stats, change-point(s), and parameter model graphs using create_model
function.
1 2 |
util |
A data frame with columns columns: energy_type, OAT, usage and estimated (1 for estimated usage and 0 for actual usage). See |
plot_flag |
A boolean value. Defaults to |
step |
A single numeric value or a vector. If it is a single numeric value, |
n |
A numeric value that determines threshold for population test: |
unretrofit_flag |
A boolean value to indicate whether it is retrofit or unretrofit. Defaults to |
This function can be used for both retrofit and unretrofit data.
However, if you want to run this function with retrofit data, subset
or filter
the data first by prepost.
If input util
data frame is not in the exact format as unretrofit_utility
, change independent varaible column to 'OAT' and dependent variable to 'usage', add 'energy_type' column and set all the values to either 'Fuel' or 'Elec'. If 'estimated' is column is not present, a column of ones will be added automatically.
If more than half of usage points (dependent variables) of input data frame are zeros, error message will be generated.
create_model
, create_model_2
, run_model_retrofit
, unretrofit_utility
and retrofit_utility
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
util = subset(unretrofit_utility, unretrofit_utility$bdbid == 'f3acce86'
& unretrofit_utility$energy_type == 'Elec') #unretrofit data
result = run_model(util) #result for unretrofit data
retrofit_util = subset(retrofit_utility, retrofit_utility$bdbid == 846152
& retrofit_utility$energy_type == 'Elec') #retrofit data
pre_util = subset(retrofit_util, retrofit_util$prepost == 1)#subset pre-retrofit utility data
pre_result = run_model(pre_util) #result for pre-retrofit data
post_util = subset(retrofit_util, retrofit_util$prepost == 3)#subset post-retrofit utility data
post_result = run_model(post_util) #result for post-retrofit data
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.