Spatial panel data models: Unbalanced panel, threshold effect and network structure