[R] error as in unused argument of a new package

Tariq Khasiri t@r|qkh@@|r| @end|ng |rom gm@||@com
Fri Feb 25 23:14:05 CET 2022


# Install some packages
# you might have some issue installing the third package (honestdid) from
github. In that case, just don't select yes for update in case of the
honestdid package. Or you could install CRVXR package before running that
command .
library(devtools)
install_github("bcallaway11/BMisc", dependencies = TRUE)
install_github("bcallaway11/did", dependencies = TRUE)
install_github("asheshrambachan/HonestDiD", dependencies = TRUE)
#--------------------------------------------------------------------------
# Load packages
#--------------------------------------------------------------------------
# Libraries
# Load libraries
library(ggplot2)
library(here)
library(foreign)
library(tidyverse)
library(dplyr)
library(did)
library(HonestDiD)

After installing the package I'm using the data used as in the creator of
the package (https://github.com/pedrohcgs/CS_RR). You can call it easily

min_wage <- readRDS((here("data",'min_wage_CS.rds')))

# Formula for covariates
xformla <- ~ region + (medinc + pop ) + I(pop^2) + I(medinc^2)  + white +
hs  + pov
#---------------------------------------------------------------------------
# Using covariates and DR DiD with never-treated as comparison group
# Fix the reference time periods
CS_never_cond <- did::att_gt(yname="lemp",
                             tname="year",
                             idname="countyreal",
                             gname="first.treat",
                             #xformla=~1,
                             xformla = xformla,
                             control_group="nevertreated",
                             data = min_wage,
                             panel = TRUE,
                             base_period="universal",
                             bstrap = TRUE,
                             cband = TRUE)

Unfortunately, its returing me the error that : Error in did::att_gt(yname
= "lemp", tname = "year", idname = "countyreal",  :
  unused argument (base_period = "universal")

since I've all the necessary packages and especially did package installed,
I shouldn't have the problem. Some suggestions will be highly appreciated.

	[[alternative HTML version deleted]]



More information about the R-help mailing list