summary.DE: Summary method for class 'DE'

Description Usage Arguments Value Examples

View source: R/Disequilibrium.R

Description

Summary method for class 'DE'

Usage

1
2
## S3 method for class 'DE'
summary(object, robust = FALSE, ...)

Arguments

object

An object of class DE for which a summary is desired.

robust

A logical determining if robust standard errors should be used. If true standard errors are from sandwich::sandwich, else hessian.

...

Unused

Value

A matrix summary of estimates is returned. The columns are:

Estimate

Maximum likelihood point estimate.

Std. Error

Asymptotic standard error estimate of maximum likelihood point estimators using numerical hessian.

z value

z value for zero value null hypothesis using asymptotic standard error estimate.

Pr(>|z|)

P value for a two sided null hyptothesis test using the z value.

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
set.seed(1775)
library(MASS)
beta01 = c(1,1)
beta02 = c(-1,-1)
N = 10000
SigmaEps = diag(2)
SigmaX = diag(2)
MuX = c(0,0)
par0 = c(beta01, beta02, SigmaX[1, 1], SigmaX[1, 2], SigmaX[2, 2])

Xgen = mvrnorm(N,MuX,SigmaX)
X1 = cbind(1,Xgen[,1])
X2 = cbind(1,Xgen[,2])
X = list(X1 = X1,X2 = X2)
eps = mvrnorm(N,c(0,0),SigmaEps)
eps1 = eps[,1]
eps2 = eps[,2]
Y1 = X1 %*% beta01 + eps1
Y2 = X2 %*% beta02 + eps2
Y = pmin(Y1,Y2)
df = data.frame(Y = Y, X1 = Xgen[,1], X2 = Xgen[,2])

results = DE(formula = Y ~ X1 | X2, data = df)

summary(results)

Disequilibrium documentation built on July 2, 2020, 3:27 a.m.