quantify: quantify: quantification of marginal effects in...

Description Usage Arguments Details Value See Also Examples

Description

quantify: quantification of marginal effects in linear-in-means models.

Usage

1
2
## S3 method for class 'econet'
quantify(object, ...)

Arguments

object

first object in the list of outcomes returned by net_dep (available only if the argument model is set to "model_B").

...

other arguments

Details

quantify returns marginal effects for net_dep objects when model = "model_B" and hypothesis = "lim". For additional details, see the vignette

Value

an object of class data.frame listing direct and indirect variable effects (mean, standard deviation, max, min).

See Also

net_dep

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Load data
data("db_cosponsor")
data("G_alumni_111")
db_model_B <- db_cosponsor
G_model_B <- G_cosponsor_111
G_exclusion_restriction <- G_alumni_111
are_factors <- c("party", "gender", "nchair")
db_model_B[are_factors] <- lapply(db_model_B[are_factors], factor)

# Specify formula
f_model_B <- formula("les ~gender + party + nchair")

# Specify starting values
starting <- c(alpha = 0.23952,
              beta_gender1 = -0.22024,
              beta_party1 = 0.42947,
              beta_nchair1 = 3.09615,
              phi = 0.40038,
              unobservables = 0.07714)

# Fit Linear-in-means model
lim_model_B <- net_dep(formula = f_model_B, data = db_model_B,
                       G = G_model_B, model = "model_B", estimation = "NLLS",
                       hypothesis = "lim", endogeneity = TRUE, correction = "heckman",
                       first_step = "standard",
                       exclusion_restriction = G_exclusion_restriction,
                       start.val = starting)
quantify(lim_model_B)

# WARNING, This toy example is provided only for runtime execution.
# Please refer to previous examples for sensible calculations.
data("db_alumni_test")
data("G_model_A_test")
db_model <- db_alumni_test
G_model <- G_model_A_test
f_model <- formula("les ~ dw")
lim_model_test <- net_dep(formula = f_model, data = db_model,
                       G = G_model, model = "model_B", estimation = "NLLS",
                       hypothesis = "lim", start.val = c(alpha = 0.4553039,
                                                         beta_dw = -0.7514903,
                                                         phi = 1.6170539))
quantify(lim_model_test)

econet documentation built on May 24, 2021, 5:09 p.m.