its_llm_plot: Plot the Estimation and Placebo Sample

Description Usage Arguments See Also Examples

Description

its_llm_plot helps to visualize which data points are used to estimate the intercept shift at the cut-point and the placebo estimates.

Usage

1
its_llm_plot(df, rvar, outcome, bw, donut = 0)

Arguments

df

(required) data.frame containing all variables

rvar

(required) the name of the running variable in df

outcome

(required) the name of the outcome variable in df

bw

either a scalar or a vector of length 2 defining the bandwidth to the left (right) of the cut-point on the scale of rvar

donut

either a scalar or a vector of length 2 defining the length of the period to the left (right) of the cut-point for which the data are dropped (on the scale of rvar).

trend

include a linear term ('lin'), a quadratic term ('quad') or no trend at all ('none')?

See Also

its_llm_placebo, its_llm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 ## Not run: 
 
  N <- 21
  time <- seq(-1,1,length.out=N)
  treat <- as.numeric(time >= 0)
  y <- 1 + time + treat*1 + rnorm(N,0,0.25)
  df <- data.frame(y=y, time=time)
  its_llm_plot(df, rvar="time", outcome="y", bw=0.25)


## End(Not run)

sumtxt/itstools documentation built on May 30, 2019, 8:38 p.m.