pgsc.wald.test {pgsc}R Documentation

A wrapper for the wald test of a restricted solution

Description

A wrapper for the wald test of a restricted solution

Usage

pgsc.wald.test(dta, dep.var, indep.var, sol.rest, n.boot = 10000,
  seed = 42)

Arguments

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.

Details

See the vignette "Using pgsc" for an extended example.

Value

Returns the wald test as gsc.wald object, a list with entries:

b

The point estimate of the coefficients on the dependent variables

S

The Wald statistic

s.boot

The bootstrapped Wald statistic

p.value

The p-value for the Wald statistic.

Examples

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)

[Package pgsc version 1.0.0 Index]