Title: | A Feasible Generalized Least Squares Estimator for Regression Analysis of Outcomes with Network Dependence |
---|---|
Description: | The function estimates a multivariate regression model for outcomes with network dependence. |
Authors: | Weihua An |
Maintainer: | Weihua An <[email protected]> |
License: | GPL-3 |
Version: | 1.0 |
Built: | 2024-11-14 02:58:02 UTC |
Source: | https://github.com/cran/fglsnet |
"fglsnet"
.Simulated data for demonstrating "fglsnet"
.
data(dat)
data(dat)
An object of class list
of length 3.
Y
is the outcome. X
contains the regressors including the intercept.. M
is the dependence network.
fglsnet
estimates a multivariate regression model for analyzing outcomes with network dependence.
fglsnet( formula, M = NULL, directed = TRUE, mcorr = TRUE, CSE = FALSE, k = 10, data = data )
fglsnet( formula, M = NULL, directed = TRUE, mcorr = TRUE, CSE = FALSE, k = 10, data = data )
formula |
A formula indicating the regression model. |
M |
The dependence network. |
directed |
Whether the dependence network is directed or undirected. |
mcorr |
Whether request multiple correlation coefficients to distinguish triadic, mutual, and asymmetric error dependence. |
CSE |
Whether use clustered standard error for the residual regression. Default cluster is the ego unit. |
k |
The number of iterations in the fgls estimation. |
data |
The data that are used for the regression. |
The function estimates a multivariate regression model for analyzing outcomes with network dependence.
A list containing the coefficient coef
, the testing results on the error correlations rtest
,
the estimated error variance Sigma
, the estimated error correlation matrix Omega
, and the OLS estimates ols
.
An, Weihua. 2021. “A Tale of Twin-Dependence: A New Multivariate Regression Model and an FGLS Estimator for Analyzing Outcomes with Network Dependence." Sociological Methods and Research. (Forthcoming)
Greene, William H. (2008). Econometric Analysis (6th edition). New Jersey: Pearson Prentice Hall.
data(dat) g <- fglsnet(Y~ X-1, M = dat$M, directed = TRUE, mcorr = 1, k = 5, data = dat) g$coef
data(dat) g <- fglsnet(Y~ X-1, M = dat$M, directed = TRUE, mcorr = 1, k = 5, data = dat) g$coef