Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in check_context(dt_input, context_vars, context_signs) : Allowed values for 'context_signs' are: positive, negative, default #1161

Open
sab26699 opened this issue Nov 22, 2024 · 0 comments

Comments

@sab26699
Copy link

Project Robyn

Describe issue

Working with a data set that has many contextual variables and keep getting the following error. I know I need to adjust something about the data set, but I'm not sure what. Any guidance would be helpful.

Error in check_context(dt_input, context_vars, context_signs) : 
  Allowed values for 'context_signs' are: positive, negative, default

Provide reproducible example

Blinded sample data set: MMMWeeklyV2.xlsx

InputCollect <- robyn_inputs(
  dt_input = MMMWeeklyV2,
  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" (ROI) or "conversion" (CPA)
  prophet_vars = c("trend", "season", "holiday"), # "trend","season", "weekday" & "holiday"
  prophet_country = "US", # input country code. Check: dt_prophet_holidays
  context_vars = c("econactiv", "privatehousingunits", "thirtyyrmortgage", "vehiclesales", "primeloan"), # e.g. competitors, discount, unemployment etc
  paid_media_spends = c("Radio_S", "DSPDis_S", "DSPVid_S", "DSPAud_S", "FBBrand_S", "FBNonBrand_S", "GoogleBrand_S", "GoogleNonBrand_S", "YouTube_S"), # mandatory input
  paid_media_vars = c("Radio_S", "DSPDis_I", "DSPVid_I", "DSPAud_I", "FBBrand_I", "FBNonBrand_I", "GoogleBrand_I", "GoogleNonBrand_I", "YouTube_I" ), # mandatory.
  # paid_media_vars must have same order as paid_media_spends. Use media exposure metrics like
  # impressions, GRP etc. If not applicable, use spend instead.
  organic_vars = "Promo_NIL", "Promo_Home", "Promo_Product", "Event", # marketing activity without media spend
  factor_vars = c("Promo_NIL", "Promo_Home", "Promo_Product", "Event"), # force variables in context_vars or organic_vars to be categorical
  window_start = "2018-12-30",
  window_end = "2024-08-25",
  adstock = "geometric" # geometric, weibull_cdf or weibull_pdf.
)
print(InputCollect)

Environment & Robyn version

Make sure you're using the latest Robyn version before you post an issue.

  • Robyn version 3.11.1
  • R version 4.3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant