mml {AGPRIS} | R Documentation |
MML estimator
Description
This function estimates a space time linear model according to the specified formula using the ML estimator as in Elhorst (2010) doi:10.1016/j.regsciurbeco.2010.03.003. The estimator maximizes the full log-likelihood function in which the parameter of spatial dependence is constrained.
Usage
mml(Rho, ff, dataset, wmat, var.agg, m = 10)
Arguments
Rho |
the constrained parameter of spatial dependence |
ff |
Formula of the linear model. It excludes the spatial lag |
dataset |
Data frame with the data |
wmat |
Spatial weight matrix |
var.agg |
Spatial index of the data frame |
m |
How many time periods have passed since the beginning of the space-time process |
Value
The estimates tables
Examples
set.seed(123)
sd = sim_data_fe(dataset=regsamp,N=50,TT=6,
spatial = 80,Tau = -0.2,Rho = 0.4,
Beta = 2,sdDev = 2,startingT = 10,
LONGLAT = TRUE);sd[[1]]$X2 = stats::rnorm(nrow(sd[[1]]@data))
est_mml = mml(dataset = sd[[1]]@data,Rho = 0.4,
ff = Y~X1+X2,
wmat = sd[[2]],var.agg = c('Anno','Cod_Provincia'),
m = 10)
est_mml
[Package AGPRIS version 2.0 Index]