Description Usage Arguments Details Value Examples
A wrapper for the wald test of a restricted solution
1 2 | pgsc.wald.test(dta, dep.var, indep.var, sol.rest, n.boot = 10000,
seed = 42)
|
dta |
A dataframe |
dep.var |
A vector of strings of names of dependent variables. |
indep.var |
A vector of strings of names of independent (treatment) variables. |
sol.rest |
A restricted solution which is being tested |
n.boot |
The number of bootstrapped samples for the variance calculation. Default is 10000. |
seed |
Randomization seed. Default is 42. |
See the vignette "Using pgsc
" for an extended example.
Returns the wald test as gsc.wald
object, a list with entries:
The point estimate of the coefficients on the dependent variables
The Wald statistic
The bootstrapped Wald statistic
The p-value for the Wald statistic.
1 2 3 4 5 6 7 | data("pgsc.dta")
g.i <- function(b) b[1] ; g.i.grad <- function(b) c(1,0)
sol.r <- pgsc(pgsc.dta, dep.var = 'y', indep.var = c('D1','D2'),
b.init = c(0,1), method='onestep', g.i=g.i, g.i.grad=g.i.grad )
wald <- pgsc.wald.test( pgsc.dta, 'y', indep.var = c('D1','D2'), sol.r )
summary(wald)
plot(wald)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.