This function estimates a space time linear model according to the specified formula using the ML estimator as in Elhorst (2010) tools:::Rd_expr_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.
mml(Rho, ff, dataset, wmat, var.agg, m = 10)
The estimates tables
the constrained parameter of spatial dependence
Formula of the linear model. It excludes the spatial lag
Data frame with the data
Spatial weight matrix
Spatial index of the data frame
How many time periods have passed since the beginning of the space-time process
# \donttest{
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
# }
Run the code above in your browser using DataLab