diff --git a/R/R/inputs.R b/R/R/inputs.R index c95115f2c..174d1f3cc 100644 --- a/R/R/inputs.R +++ b/R/R/inputs.R @@ -33,11 +33,13 @@ #' @param dt_holidays data.frame. Raw input holiday data. Load standard #' Prophet holidays using \code{data("dt_prophet_holidays")} #' @param date_var Character. Name of date variable. Daily, weekly -#' and monthly data supported. Weekly requires weekstart of Monday or Sunday. -#' date_var must have format "2020-01-01". Default to automatic date detection. +#' and monthly data supported. Weekly requires week-start of Monday or Sunday. +#' \code{date_var} must have format "2020-01-01" (YYY-MM-DD). +#' Default to automatic date detection. #' @param dep_var Character. Name of dependent variable. Only one allowed #' @param dep_var_type Character. Type of dependent variable -#' as "revenue" or "conversion". Only one allowed and case sensitive. +#' as "revenue" or "conversion". Will be used to calculate ROI or CPI, +#' respectively. Only one allowed and case sensitive. #' @param paid_media_spends Character vector. When using exposure level #' metrics (impressions, clicks, GRP etc) in \code{paid_media_vars}, provide #' corresponding spends for ROAS calculation. For spend metrics in @@ -64,10 +66,10 @@ #' push-notifications, social media posts etc. Compared to paid_media_vars #' organic_vars are often marketing activities without clear spends. #' @param organic_signs Character vector. Choose any of -#' \code{c("default", "positive", "negative")}. Control +#' "default", "positive", "negative". Control #' the signs of coefficients for organic_signs. Must have same #' order and same length as \code{organic_vars}. By default it's -#' set to 'positive'. +#' set to "positive". #' @param factor_vars Character vector. Specify which of the provided #' variables in organic_vars or context_vars should be forced as a factor. #' @param prophet_vars Character vector. Include any of "trend", @@ -75,15 +77,15 @@ #' to use all for daily data and "trend", "season", "holiday" for #' weekly and above cadence. #' @param prophet_signs Character vector. Choose any of -#' \code{c("default", "positive", "negative")}. Control +#' "default", "positive", "negative". Control #' the signs of coefficients for prophet variables. Must have same #' order and same length as \code{prophet_vars}. By default it's -#' set to 'defualt'. +#' set to "default". #' @param prophet_country Character. Only one country allowed once. #' Including national holidays for 59 countries, whose list can #' be found loading \code{data("dt_prophet_holidays")}. -#' @param adstock Character. Choose any of \code{c("geometric", "weibull_cdf", -#' "weibull_pdf")}. Weibull adtock is a two-parametric function and thus more +#' @param adstock Character. Choose any of "geometric", "weibull_cdf", +#' "weibull_pdf". Weibull adstock is a two-parametric function and thus more #' flexible, but takes longer time than the traditional geometric one-parametric #' function. CDF, or cumulative density function of the Weibull function allows #' changing decay rate over time in both C and S shape, while the peak value will diff --git a/R/man/robyn_inputs.Rd b/R/man/robyn_inputs.Rd index cd8e9e638..b7f734c91 100644 --- a/R/man/robyn_inputs.Rd +++ b/R/man/robyn_inputs.Rd @@ -41,13 +41,15 @@ dataset using \code{data("dt_simulated_weekly")}} Prophet holidays using \code{data("dt_prophet_holidays")}} \item{date_var}{Character. Name of date variable. Daily, weekly -and monthly data supported. Weekly requires weekstart of Monday or Sunday. -date_var must have format "2020-01-01". Default to automatic date detection.} +and monthly data supported. Weekly requires week-start of Monday or Sunday. +\code{date_var} must have format "2020-01-01" (YYY-MM-DD). +Default to automatic date detection.} \item{dep_var}{Character. Name of dependent variable. Only one allowed} \item{dep_var_type}{Character. Type of dependent variable -as "revenue" or "conversion". Only one allowed and case sensitive.} +as "revenue" or "conversion". Will be used to calculate ROI or CPI, +respectively. Only one allowed and case sensitive.} \item{prophet_vars}{Character vector. Include any of "trend", "season", "weekday", "holiday". Are case-sensitive. Highly recommended @@ -55,10 +57,10 @@ to use all for daily data and "trend", "season", "holiday" for weekly and above cadence.} \item{prophet_signs}{Character vector. Choose any of -\code{c("default", "positive", "negative")}. Control +"default", "positive", "negative". Control the signs of coefficients for prophet variables. Must have same order and same length as \code{prophet_vars}. By default it's -set to 'defualt'.} +set to "default".} \item{prophet_country}{Character. Only one country allowed once. Including national holidays for 59 countries, whose list can @@ -96,16 +98,16 @@ push-notifications, social media posts etc. Compared to paid_media_vars organic_vars are often marketing activities without clear spends.} \item{organic_signs}{Character vector. Choose any of -\code{c("default", "positive", "negative")}. Control +"default", "positive", "negative". Control the signs of coefficients for organic_signs. Must have same order and same length as \code{organic_vars}. By default it's -set to 'positive'.} +set to "positive".} \item{factor_vars}{Character vector. Specify which of the provided variables in organic_vars or context_vars should be forced as a factor.} -\item{adstock}{Character. Choose any of \code{c("geometric", "weibull_cdf", -"weibull_pdf")}. Weibull adtock is a two-parametric function and thus more +\item{adstock}{Character. Choose any of "geometric", "weibull_cdf", +"weibull_pdf". Weibull adstock is a two-parametric function and thus more flexible, but takes longer time than the traditional geometric one-parametric function. CDF, or cumulative density function of the Weibull function allows changing decay rate over time in both C and S shape, while the peak value will diff --git a/demo/demo.R b/demo/demo.R index 102ba9fc1..d37ac34bc 100644 --- a/demo/demo.R +++ b/demo/demo.R @@ -86,7 +86,7 @@ InputCollect <- robyn_inputs( ,dt_holidays = dt_prophet_holidays ,date_var = "DATE" # date format must be "2020-01-01" ,dep_var = "revenue" # there should be only one dependent variable - ,dep_var_type = "revenue" # "revenue" or "conversion" + ,dep_var_type = "revenue" # "revenue" (ROI) or "conversion" (CPA) ,prophet_vars = c("trend", "season", "holiday") # "trend","season", "weekday" & "holiday" ,prophet_country = "DE"# input one country. dt_prophet_holidays includes 59 countries by default ,context_vars = c("competitor_sales_B", "events") # e.g. competitors, discount, unemployment etc