| Title: | Maximum Likelihood Estimation Routines for Panel Network Autocorrelation Models |
|---|---|
| Description: | A set of maximum likelihood estimation routines for panel network autocorrelation models. The package contains functionality for fixed and random effects panel network autocorrelation model, in addition to dynamic panel network autocorrelation that contains time lags of the response and networks. Moreover, the package allows for multiple networks to be fitted. For information on the types of models estimated in this package, please see Anselin (1988) <doi:10.1007/978-94-015-7799-1>, Cook et al. (2023) <doi:10.1017/S0003055422000272>, Hays et al. (2010) <doi:10.1016/j.stamet.2009.11.005>, Lee and Yu (2012) <doi:10.1111/j.1468-2354.2012.00724.x>, Millo (2014) <doi:10.1016/j.csda.2013.07.024>, Millo and Piras (2012) <doi:10.18637/jss.v047.i01>, and Wang and Yu (2015) <doi:10.1016/j.econlet.2015.01.021>. |
| Authors: | Kevin Carson [aut, cre] |
| Maintainer: | Kevin Carson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-09-16 09:44:15 UTC |
| Source: | https://github.com/kevincarson/netpanel |
pnam model fitsThis function extracts the Maximum Likelihood (ML) parameter estimates for the
exogenous covariates from a pnam model fit.
## S3 method for class 'pnam' coef(object, ...)## S3 method for class 'pnam' coef(object, ...)
object |
An object of class "pnam". |
... |
Additional arguments for other methods. |
The vector of estimated parameter values for the exogenous covariates.
data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables #' a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") coef(fe.pnam) #the mle parameter valuesdata("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables #' a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") coef(fe.pnam) #the mle parameter values
pnam model fitsThis function returns the model fitted values, , for a fitted pnam model. The function returns
two types of fitted values to the user: linear regression fitted values and network regression fitted values. The
network regression fitted values are formulated as: , where
is the included network. In comparison, the linear regression fitted values are formulated as:
.
## S3 method for class 'pnam' fitted(object, ...)## S3 method for class 'pnam' fitted(object, ...)
object |
An object of class |
... |
Additional arguments for other methods. |
A data.frame object that stores the fitted values from a pnam model fit, where the column "ols.fitted" stores the
linear regression fitted values and "network.fitted" stores the network regression fitted values (see above).
data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") fitted(fe.pnam) #the data.frame of fitted valuesdata("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") fitted(fe.pnam) #the data.frame of fitted values
pnam model fitsThis function extracts the estimated model loglikelhood from a pnam model fit.
## S3 method for class 'pnam' logLik(object, ..., REML = FALSE)## S3 method for class 'pnam' logLik(object, ..., REML = FALSE)
object |
An object of class |
... |
Additional arguments for other methods. |
REML |
From the generic |
The estimated model log-likelihood.
data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") logLik(fe.pnam) #the estimated model log-likelihood.data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") logLik(fe.pnam) #the estimated model log-likelihood.
A function that contains Maximum Likelihood estimation routines to fit panel network autocorrelation models (MLPNAM). The function allows for (1) fixed and random actor-level effects, (2) the inclusion of time lagged outcome and network terms, (3) multiple networks to construct the network (spatial) filtering matrix, and (4) for the time-varying errors to exhibit network autocorrelation, that is, for the model to become a network mixed effects model (i.e., error + lag model). Please see the Details section for more information.
mlpnam( reg.formula, net.formula, data, time, actor, model = c("fixed", "random", "dynamic"), fixed.effect = c("actor", "time", "two-way"), dynamic.lag = c("network", "outcome", "network x outcome"), errors = c("idiosyncratic", "autocorrelated"), autocorrelated.network = NULL, optim.method = "L-BFGS-B", optim.control = list(), ... )mlpnam( reg.formula, net.formula, data, time, actor, model = c("fixed", "random", "dynamic"), fixed.effect = c("actor", "time", "two-way"), dynamic.lag = c("network", "outcome", "network x outcome"), errors = c("idiosyncratic", "autocorrelated"), autocorrelated.network = NULL, optim.method = "L-BFGS-B", optim.control = list(), ... )
reg.formula |
A |
net.formula |
A |
data |
An object of class |
time |
A |
actor |
A |
model |
The type of panel network autocorrelation model to be estimated (see the Details section). "fixed" indicates
that a within-estimator fixed effects model should be estimated. The demeaning of the data structure is based upon the
|
fixed.effect |
optional. When |
dynamic.lag |
optional. When |
errors |
What is the assumed structure of time-varying errors? "idiosyncratic" indicates that the time-varying errors are assumed to
be drawn from the following distribution: |
autocorrelated.network |
optional. When |
optim.method |
optional. The numeric optimization procedure to be employed by |
optim.control |
optional. A list control options for the |
... |
Additional arguments. |
This function fits a panel network autocorrelation model with time-varying social adjacency matrices via Maximum Likelihood Estimation. The estimated model takes the form:
where is the outcome vector for actors at time , is the
network autocorrelation term for the social network at time (taken from the net.formula
argument), are the set of exogenous time-varying (and invariant) regressors (taken from the reg.formula
argument). Additionally, is the time-varying error term that is the sum
of the time-invariant unit-specific unobserved factors, , thought to explain and are the
time- and unit-varying unobserved factors. Dependent upon the model argument, the function will (1) estimate a fixed-effects
network regression, where the within estimator demeans the data by time, actor, or both, (2) estimate a random effects
network regression, or (3) estimate a dynamic panel network autocorrelation where the time lags of the outcome
and network variables are added to the set of exogenous covariates. Please see the set of references below for more
information of network (spatial) cross-sectional and panel models and their respective estimation strategies (e.g., fixed effects).
Moreover, the model can also estimate the network mixed effects model, where the estimated formula is:
where is the error autocorrelation parameter, is the error social adjacency matrix (if applicable,
the network included in the autocorrelated.network argument), and are a set of i.i.d normal errors at time .
Internally, the function follows the two-step computation strategy discussed in Millo and Piras (2012). In the first step, the set of
parameter estimates for , , and are found via numerical optimization routines. Importantly, within each search,
the values for and are updated via their GLS estimators. In the second step, once the ML parameter estimates for ,
, and are found, the final GLS estimates for and are computed. The asymptotic
variance-covariance matrix for , , and are the inverse of the negative Hessian matrix and the
variance-covariance matrix for is found via the standard GLS variance estimator. For sake of brevity, please see the below listed
references for more information on these estimators.
An object of class pnam as a list containing the following elements:
N - The number of unique units in the panel network dataset.
t - The number of panels (time periods) in the panel network dataset.
type - The type of model estimated per the model argument.
error.structure - The assumed structure for the time-varying errors per the errors argument.
fe.type - If a fixed effects model is estimated, the type of fixed effects demeaning per the fixed.effect argument.
lag.type - If a dynamic model is estimated, the type of lag structure included in the model per the dynamic.lag argument
max.eigen - The maximum absolute eigenvalue of the rho*W matrix.
lambda - If the time-varying errors are assumed to be autocorrelated, the estimated value for lambda.
rho - The vector of estimated maximum likelihood rho parameters.
vcov.rho - The asymptotic variance-covariance of the estimated rho parameters.
coefficients - The vector of estimated exogenous ML parameters.
vcov - The asymptotic variance-covariance of the exogenous ML parameters.
sigma2 - The estimated variance of the time-varying residual.
residuals - The residuals of the fitted model.
fitted.values - The fitted values from the estimated model.
logLik - The estimated model log-likelihood.
convergence - The converge value returned from the optim function. 0 indicates successful convergence.
netfilter - The filtering matrix of the estimated model (), where is the jth network from the
net.formula argument.
k - The total number of estimated parameters.
df - The model degrees of freedom.
AIC - The AIC of the estimated PNAM.
BIC - The BIC of the estimated PNAM.
response - The outcome vector ().
covariates - The covariate matrix ().
optim.information - The returned list from the optim function.
error.dis - If a random effects model is estimated, a list that contains the
residual variances for the time-varying residuals (idiosyncratic), the unit-/actor-specific
residual variances (unit), and the estimated ratio of the variances (theta).
theta - If a random effects model is estimated, the estimated value for
theta (the ratio of the unit and idiosyncratic variances.)
vcov.theta - If a random effects model is estimated, the asymptotic variance of
the estimated theta value.
Anselin, Luc. 1988. Spatial Econometrics: Methods and Models. Dordrecht: Springer Netherlands.
Cook, Scott J., Jude C. Hays and Robert J. Franzese. 2023. “STADL Up! The Spatiotemporal Autoregressive Distributed Lag Model for TSCS Data Analysis.” American Political Science Review 117(1):59–79.
Doreian, Patrick. 1982. “Maximum Likelihood Methods for Linear Models: Spatial Effect and Spatial Disturbance Terms.” Sociological Methods & Research 10(3):243–269.
Doriean, Patrick, Klaus Teuter and Chi-Hsein Wang. 1984. “Network Autocorrelation Models: Some Monte Carlo Results.” Sociological Methods & Research 13(2):155–200.
Duxbury, Scott. 2023. Longitudinal Network Models. Vol. 192 of Quantitative Applications in the Social Sciences SAGE Publications.
Hays, Jude C., Aya Kachi, and Robert J. Franzese. 2010. "A Spatial Model Incorporating Dynamic, Endogenous Network Interdependence: A Political Science Application." Statistical Methodology 7(3): 406-428.
Lee, Lung-fei and Jihai Yu. 2010. “Estimation of Spatial Autoregressive Panel Data Models with Fixed Effects.” Journal of Econometrics 154(2):165–185.
Lee, Lung-fei and Jihai Yu. 2012a. “QML Estimation of Spatial Dynamic Panel Data Models with Time Varying Spatial Weights Matrices.” Spatial Economic Analysis 7(1):31–74.
Lee, Lung-fei and Jihai Yu. 2012b. “Spatial Panels: Random Components Versus Fixed Effects.” International Economic Review 53(4):1369–1412.
Millo, Giovanni. 2014. "Maximum Likelihood Estimation of Spatially and Serially Correlated Panels with Random Effects." Computational Statistics & Data Analysis 71: 914-933.
Millo, Giovanni and Gianfranco Piras. 2012. "splm: Spatial Panel Data Models in R." Journal of Statistical Software 47: 1-38.
Neuman, Eric J. and Mark S. Mizruchi. 2010. “Structure and Bias in the Network Autocorrelation Model.” Social Networks 32(4):290–300.
Wang, Wei and Jihai Yu. 2015. "Estimation of Spatial Panel Data Models with Time Varying Spatial Weights Matrices.” Economic Letters 128:95-99.
coef.pnam, vcov.pnam, logLik.pnam,
AIC, residuals.pnam, fitted.pnam,
netimpacts.
data("net1", package = "netpanel") #the first panel network data("net2", package = "netpanel") #the second panel network data("net3", package = "netpanel") #the third panel network data("simulated.data", package = "netpanel") #the simulated variables # a random effects panel network autocorrelation model re.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "random") summary(re.pnam) # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1 + net2, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") summary(fe.pnam) # a dynamic panel network autocorrelation model with autocorrelated errors dyn.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1 + net2, data = simulated.data, time = ~panel, actor = ~unit, model = "dynamic", dynamic.lag = "outcome") summary(dyn.pnam) # a fixed effects panel network autocorrelation model with autocorrelated errors fe.pnam.error <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", errors = "autocorrelated", autocorrelated.network = net3) summary(fe.pnam.error)data("net1", package = "netpanel") #the first panel network data("net2", package = "netpanel") #the second panel network data("net3", package = "netpanel") #the third panel network data("simulated.data", package = "netpanel") #the simulated variables # a random effects panel network autocorrelation model re.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "random") summary(re.pnam) # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1 + net2, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") summary(fe.pnam) # a dynamic panel network autocorrelation model with autocorrelated errors dyn.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1 + net2, data = simulated.data, time = ~panel, actor = ~unit, model = "dynamic", dynamic.lag = "outcome") summary(dyn.pnam) # a fixed effects panel network autocorrelation model with autocorrelated errors fe.pnam.error <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", errors = "autocorrelated", autocorrelated.network = net3) summary(fe.pnam.error)
list of simulated panel social networks (1)A list of length 10 where each element is an simulated row-normalized 50 x 50 social
adjacency matrix, where a non-zero entry denotes a directed relationship
from to at time .
data(net1)data(net1)
net1A list of length 10 where each element is an simulated row-normalized 50 x 50 social
adjacency matrix, where a non-zero entry denotes a directed relationship
from to at time .
list of simulated panel social networks (2)A list of length 10 where each element is an simulated row-normalized 50 x 50 social
adjacency matrix, where a non-zero entry denotes a directed relationship
from to at time .
data(net2)data(net2)
net2A list of length 10 where each element is an simulated row-normalized 50 x 50 social
adjacency matrix, where a non-zero entry denotes a directed relationship
from to at time .
list of simulated panel social networks (3)A list of length 10 where each element is an simulated row-normalized 50 x 50 social
adjacency matrix, where a non-zero entry denotes a directed relationship
from to at time .
data(net3)data(net3)
net3A list of length 10 where each element is an simulated row-normalized 50 x 50 social
adjacency matrix, where a non-zero entry denotes a directed relationship
from to at time .
pnam objectThis function returns the estimated average direct, indirect, and total impacts from a fitted panel network autocorrelation model.
netimpacts(object, return.impact.matrix = FALSE, digits = 5)netimpacts(object, return.impact.matrix = FALSE, digits = 5)
object |
An object of class |
return.impact.matrix |
TRUE/FALSE. If TRUE, the function will also return the estimated impact matrix for each estimated covariate. Set to FALSE by default. |
digits |
The number of digits to round the estimates after the decimal point. |
In classical linear regression, the marginal effect of a regressor, , on the
outcome, , is . In panel network (and spatial) effects models, the
marginal effect is:
The direct impact is the average of the diagonal value of the above matrix, the
indirect impact is the average of the row sum of the off-diagonal values, and
the total impact is sum of both. The function will also return the impact matrix for each
estimated effect if return.impact.matrix is set to TRUE.
A data.frame object that stores the direct, indirect, and total impact for each estimated effect in the fitted pnam model.
data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") netimpacts(fe.pnam) #compute the impact valuesdata("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") netimpacts(fe.pnam) #compute the impact values
The netpanel package contains maximum likelihood estimation routines to fit panel
network autocorrelation models (PNAMs) with time-varying social adjacency matrices. The
package contains functionality for (1) fixed and random effects PNAMs, (2) dynamic PNAMs that
include time lags of the outcome and networks, and (3) the estimation of network mixed
effects models where, in addition to the lag of the outcome, the time-varying residuals are
assumed to exhibit network autocorrelation. Importantly, the package allows for multiple
network lags to be fitted simultaneously. Please see the list of below references for more information
on panel network (spatial) autocorrelation models.
The netpanel package primarily works through the wrapper function mlpnam. The mlpnam
function returns an S3 object of class pnam that stores the relevant results of the fitted PNAM. The full set of functions (including user-helper S3 methods) are:
mlpnam: fits a panel network autocorrelation model to an empirical panel network dataset via Maximum Likelihood Estimation.
netimpacts: computes the direct, indirect, and total network impacts for each included regressor from a fitted pnam S3 object.
coef.pnam: extracts the vector of ML parameter estimates from a fitted pnam S3 object.
vcov.pnam: extracts the asymptotic variance-covariance matrix from a fitted pnam S3 object.
logLik.pnam: extracts the estimated log-likelihood from a fitted pnam S3 object.
residuals.pnam: extracts the model residuals from a fitted pnam S3 object.
fitted.pnam: extracts the linear and network regression fitted values from a fitted pnam S3 object.
Additionally, the netpanel package includes a set of simulated pseudo data objects for users to start fitting panel network
autocorrelation models. Please see the simulated.data netpanel help page for more information on the
simulated dataset and respective networks.
Kevin A. Carson [email protected]
Anselin, Luc. 1988. Spatial Econometrics: Methods and Models. Dordrecht: Springer Netherlands.
Cook, Scott J., Jude C. Hays and Robert J. Franzese. 2023. “STADL Up! The Spatiotemporal Autoregressive Distributed Lag Model for TSCS Data Analysis.” American Political Science Review 117(1):59–79.
Doreian, Patrick. 1982. “Maximum Likelihood Methods for Linear Models: Spatial Effect and Spatial Disturbance Terms.” Sociological Methods & Research 10(3):243–269.
Doriean, Patrick, Klaus Teuter and Chi-Hsein Wang. 1984. “Network Autocorrelation Models: Some Monte Carlo Results.” Sociological Methods & Research 13(2):155–200.
Duxbury, Scott. 2023. Longitudinal Network Models. Vol. 192 of Quantitative Applications in the Social Sciences SAGE Publications.
Hays, Jude C., Aya Kachi, and Robert J. Franzese. 2010. "A Spatial Model Incorporating Dynamic, Endogenous Network Interdependence: A Political Science Application." Statistical Methodology 7(3): 406-428.
Lee, Lung-fei and Jihai Yu. 2010. “Estimation of Spatial Autoregressive Panel Data Models with Fixed Effects.” Journal of Econometrics 154(2):165–185.
Lee, Lung-fei and Jihai Yu. 2012a. “QML Estimation of Spatial Dynamic Panel Data Models with Time Varying Spatial Weights Matrices.” Spatial Economic Analysis 7(1):31–74.
Lee, Lung-fei and Jihai Yu. 2012b. “Spatial Panels: Random Components Versus Fixed Effects.” International Economic Review 53(4):1369–1412.
Millo, Giovanni. 2014. "Maximum Likelihood Estimation of Spatially and Serially Correlated Panels with Random Effects." Computational Statistics & Data Analysis 71: 914-933.
Millo, Giovanni and Gianfranco Piras. 2012. "splm: Spatial Panel Data Models in R." Journal of Statistical Software 47: 1-38.
Neuman, Eric J. and Mark S. Mizruchi. 2010. “Structure and Bias in the Network Autocorrelation Model.” Social Networks 32(4):290–300.
Wang, Wei and Jihai Yu. 2015. "Estimation of Spatial Panel Data Models with Time Varying Spatial Weights Matrices.” Economic Letters 128:95-99.
Useful links:
Report bugs at https://github.com/kevinCarson/netpanel/issues
pnam model objects.Print Method for pnam model objects.
## S3 method for class 'pnam' print(x, digits = 5, ...)## S3 method for class 'pnam' print(x, digits = 5, ...)
x |
An object of class |
digits |
The number of digits to print after the decimal point. |
... |
Additional arguments (currently unused). |
No return value. Prints out the main results of a pnam object.
summary.pnam Panel Network Autocorrelation Model SummaryPrint Method for summary.pnam Panel Network Autocorrelation Model Summary
## S3 method for class 'summary.pnam' print(x, digits = 5, ...)## S3 method for class 'summary.pnam' print(x, digits = 5, ...)
x |
An object of class |
digits |
The number of digits to print after the decimal point. |
... |
Additional arguments (currently unused). |
No return value. Prints out the summary of a pnam object.
pnam model fitsThis function returns the model residuals for a pnam model fit.
## S3 method for class 'pnam' residuals(object, ...)## S3 method for class 'pnam' residuals(object, ...)
object |
An object of class |
... |
Additional arguments for other methods. |
The vector of pnam model fit residuals.
data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") residuals(fe.pnam) #the vector of model residualsdata("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") residuals(fe.pnam) #the vector of model residuals
A simulated panel network dataset that contains a response variable () and three
exogenous regressors (, , and ). The exogenous regresors
and vectors are drawn from standard normal distribution, and
is a vector of random bernoulli variables. The panel
variable represents the time of data collection and the unit variable indexes the
unique actors across the panels. The outcome is generated from the following deterministic
equation:
where is the net1 netpanel data object, is the net2 netpanel data object, and
is the net3 netpanel data object.
data(simulated.data)data(simulated.data)
simulated.dataA simulated panel network dataset with size the following variables: , ,
, , panel, and unit.
pnam ObjectsSummarizes the results of a fitted pnam model object.
## S3 method for class 'pnam' summary(object, digits = 5, ...)## S3 method for class 'pnam' summary(object, digits = 5, ...)
object |
An object of class |
digits |
The number of digits to print after the decimal point. |
... |
Additional arguments (currently unused). |
A list of summary statistics for the panel network autocorrelation model, such as the estimated log-likelihood and the estimated parameters.
pnam model fitsThis function extracts the asymptotic variance-covariance matrix from
pnam model fits for the exogenous covariates. For the endogenous
variance matrices (such as the variance-covariance matrix for ), please extract those
from the model fit. For example, the variance matrix for
can be extracted as model$vcov.rho, where model is the pnam object name.
## S3 method for class 'pnam' vcov(object, ...)## S3 method for class 'pnam' vcov(object, ...)
object |
An object of class |
... |
Additional arguments for other methods. |
The asymptotic variance-covariance matrix for the exogenous covariates.
data("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") vcov(fe.pnam) #the asymptotic variance-covariance matrixdata("net1", package = "netpanel") #the first panel network data("simulated.data", package = "netpanel") #the simulated variables # a fixed effects panel network autocorrelation model fe.pnam <- mlpnam(Y~x1+x2+x3, net.formula = ~ net1, data = simulated.data, time = ~panel, actor = ~unit, model = "fixed", fixed.effect = "actor") vcov(fe.pnam) #the asymptotic variance-covariance matrix