If a model is fitted with stratafit(), then this summary function produces summary output for each level of the stratification variable in the same style as the summary.slmfit() function.

# S3 method for stratafit
summary(object, ...)

Arguments

object

is an object generated from slmfit() of class slmfit.

...

further arguments passed to or from other methods.

Value

a list with

  • model formula

  • a table of fixed effects estimates and associated standard errors

  • estimated spatial covariance parameter estimates

  • residuals

  • generalized r-squared.

Examples

data(exampledataset) ## load a toy data set
exampledataset$strata <- c(rep("A", 25), rep("B", 15))
strataobj <- stratafit(formula = counts ~ pred1 + pred2,
 data = exampledataset, stratacol = "strata",
xcoordcol = 'xcoords', ycoordcol = 'ycoords', areacol = 'areavar')
summary(strataobj)
#> $A
#> 
#> Call:
#> counts ~ pred1 + pred2
#> 
#> Residuals:
#>     Min      1Q  Median      3Q     Max 
#> -9.4506 -2.6459  0.2484  2.9445 10.5560 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept)  20.6827     2.2953   9.011   <2e-16 ***
#> pred1        -5.1222     3.3304  -1.538    0.142    
#> pred2        -0.2208     1.6677  -0.132    0.896    
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Covariance Parameters:
#>              Exponential Model
#> Nugget               5.7237151
#> Partial Sill        20.2900151
#> Range                0.7685046
#> 
#> Generalized R-squared: 0.1280635 
#> 
#> $B
#> 
#> Call:
#> counts ~ pred1 + pred2
#> 
#> Residuals:
#>     Min      1Q  Median      3Q     Max 
#> -8.6892 -3.3922 -0.0594  1.8881 12.8373 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)
#> (Intercept)   20.931   1039.525   0.020    0.984
#> pred1          2.416      5.099   0.474    0.644
#> pred2         -1.969      1.151  -1.710    0.113
#> 
#> Covariance Parameters:
#>              Exponential Model
#> Nugget            2.457091e+01
#> Partial Sill      1.080612e+06
#> Range             4.005461e+05
#> 
#> Generalized R-squared: 0.20773 
#>