Cross Validated
2025-09-12 21:07 UTC
By camila
AI-113-20250912-social-media-f9277841
Piecewise SEM with multilevel time series and unequal sample sizes — is mixing datasets per submodel OK?
I’m fitting a piecewise SEM where the response is observed at the plot × year level , but several endogenous predictors are measured once per site × year . I fit each submodel at the level of its response. Concretely, the plot-level submodel uses all plot × year rows; site-year predictors repeat across plots within each year but I account for the hierarchy with crossed random intercepts for Year and Plot and add AR(1) within Plot if residual ACF suggests it. The site-year submodels (endogenous) are fit on a smaller year-level dataset via GLS, comparing models with vs without AR(1) and retaining AR(1) when supported by AIC and diagnostics. Does this sound statistically appropriate for a piecewise SEM—i.e., using different datasets (and Ns) across submodels so long as each equation is estimated at its natural level with a suitable random/correlation structure? Code: # Year-level GLS (with/without AR(1)) m_SoilN $Year_f Year) m_Biomass Snippet of data: head(siteA_plot) WaterLevel SoilP Biomass SoilN Year Plot 1 49.35 274.11 896.47 341.22 2006 1 2 49.35 274.11 854.12 341.22 2006 2 3 49.35 274.11 506.39 341.22 2006 3 4 63.74 350.65 636.60 422.51 2007 1 5 63.74 350.65 470.17 422.51 2007 2 6 63.74 350.65 313.23 422.51 2007 3 head(siteA_year) WaterLevel SoilP SoilN Year 1 49.35 274.11 341.22 2006 2 63.74 350.65 422.51 2007 3 30.32 292.18 572.47 2008 ... ```
I’m fitting a piecewise SEM where the response is observed at the plot × year level , but several endogenous predictors are measured once per site × year . I fit each submodel at the level of its response. Concretely, the plot-level submodel uses all plot × year rows; site-year predictors repeat across plots within each year but I account for the hierarchy with crossed random intercepts for Year and Plot and add AR(1) within Plot if residual ACF suggests it. The site-year submodels (endogenous) are fit on a smaller year-level dataset via GLS, comparing models with vs without AR(1) and retaining AR(1) when supported by AIC and diagnostics. Does this sound statistically appropriate for a piecewise SEM—i.e., using different datasets (and Ns) across submodels so long as each equation is estimated at its natural level with a suitable random/correlation structure? Code: # Year-level GLS (with/without AR(1)) m_SoilN $Year_f Year) m_Biomass Snippet of data: head(siteA_plot) WaterLevel SoilP Biomass SoilN Year Plot 1 49.35 274.11 896.47 341.22 2006 1 2 49.35 274.11 854.12 341.22 2006 2 3 49.35 274.11 506.39 341.22 2006 3 4 63.74 350.65 636.60 422.51 2007 1 5 63.74 350.65 470.17 422.51 2007 2 6 63.74 350.65 313.23 422.51 2007 3 head(siteA_year) WaterLevel SoilP SoilN Year 1 49.35 274.11 341.22 2006 2 63.74 350.65 422.51 2007 3 30.32 292.18 572.47 2008 ... ```
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com