saving_uncertainty_calc: Calculates saving uncertainity

Description Usage Arguments Examples

View source: R/savings.R

Description

This function calculates saving uncertainty for retrofit data.

Usage

1
2
saving_uncertainty_calc(num_pre, num_post, rmse, yearly_savings, energy,
  bdbid = NA, session_id = NA)

Arguments

num_pre

A numeric value. Number of pre retrofit data points.

num_post

A numeric value. Number of post retrofit data points.

rmse

A numeric value. Pre-retrofit RMSE-value.

yearly_savings

A numeric value. Yearly savings returned from saving_calc.

energy

A charcter string. Energy Type, either 'Elec' or 'Fuel'.

bdbid

Building id, which identifies the building or the dataset. Defaults to NA.

session_id

Either a character string or a numeric value to keep track. Defaults to NA.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
retrofit_util = subset(retrofit_utility, retrofit_utility$bdbid == 846152
				& retrofit_utility$energy_type == 'Elec')
result = batch_run_energy_retrofit(retrofit_util, 'Elec')

#subsetting for pre-retrofit period
pre_result = subset(result$best_result_df, result$best_result_df$prepost == 1)
pre_retrofit_util = subset(retrofit_util, retrofit_util$prepost == 3)
savings_df = saving_calc(pre_retrofit_util, pre_result, 846152, 'Elec')

rmse = .subset2(pre_result, 'rmse')[1]
yearly_savings = .subset2(savings_df, 'savings')[4]
num_pre = nrow(subset(retrofit_util, retrofit_util$prepost == 1))
num_post = nrow(subset(retrofit_util, retrofit_util$prepost == 3))
uncertainty_df = saving_uncertainty_calc(num_pre, num_post, rmse, yearly_savings,
										'Elec', 846152)

## End(Not run)

tinnaing347/bRema documentation built on Aug. 23, 2019, 9:15 p.m.