run_mcp_for_single_timestep: Run MCP for all Sensors at one timestep

Description Usage Arguments Value Examples

View source: R/regression_functions.R

Description

run_mcp() but for either daily or hourly

Usage

1
2
3
4
5
6
run_mcp_for_single_timestep(
  megaframe,
  daily = TRUE,
  minimum_required_hours_for_daily_inclusion = 6,
  model_coefficient_is_0 = FALSE
)

Arguments

megaframe

A megaframe with at least one satellite model and the sms model

daily

Logical; daily timestep if true, hourly if false

minimum_required_hours_for_daily_inclusion

The number of data points required for a day to be included in the regression

model_coefficient_is_0

Whether or not the linear regression should be forced to have a zero intercept

Value

A list of model fits to the onsite data, organized by timestep->sensor->model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
daily_mcp <- run_mcp_for_single_timestep(megaframe, daily = TRUE)
get_mcp_results(daily_mcp, megaframe)

hourly_mcp <- run_mcp_for_single_timestep(megaframe, daily = FALSE)
get_mcp_results(hourly_mcp, megaframe)

## Run MCP for a specific sensor and timestep
mf <- select(megaframe, -temp, -ws)
my_mcp <- run_mcp_for_single_timestep(mf)
get_mcp_results(my_mcp, mf)

## End(Not run)

btaute/powerResource documentation built on Sept. 4, 2020, 4:36 p.m.