Skip to contents

Print description of a hgwrm object.

Usage

# S3 method for class 'hgwrm'
print(x, decimal.fmt = "%.6f", ...)

Arguments

x

An hgwrm object returned by hgwr().

decimal.fmt

The format string passing to base::sprintf().

...

Arguments passed on to print_table_md

col_sep

Column separator. Default to "".

header_sep

Header separator. Default to "-". If header_sep only contains one character, it will be repeated for each column. If it contains more than one character, it will be printed below the first row.

row_begin

Character at the beginning of each row. Default to col_sep.

row_end

Character at the ending of each row. Default to col_sep.

table_before

Characters to be printed before the table.

table_after

Characters to be printed after the table.

table_style

Name of pre-defined style. Possible values are "plain", "md", "latex", or "booktabs". Default to "plain".

Value

No return.

Examples

data(mulsam.test)
model <- hgwr(
  formula = y ~ L(g1 + g2) + x1 + (z1 | group),
  data = mulsam.test$data,
  coords = mulsam.test$coords,
  bw = 10
)
print(model)
#> Hierarchical and geographically weighted regression model
#> =========================================================
#> Formula: y ~ L(g1 + g2) + x1 + (z1 | group)
#>  Method: Back-fitting and Maximum likelihood
#>    Data: mulsam.test$data
#> 
#> Fixed Effects
#> -------------
#>  Intercept        x1 
#>   1.852190  1.967644 
#> 
#> Group-level Spatially Weighted Effects
#> --------------------------------------
#> Bandwidth: 10 (nearest neighbours)
#> 
#> Coefficient estimates:
#>  Coefficient        Min  1st Quartile     Median  3rd Quartile       Max 
#>    Intercept  -0.549094     -0.439522  -0.151433     -0.024133  0.178044 
#>           g1   0.909293      1.253143   1.692616      1.927313  2.310056 
#>           g2   1.083410      1.279953   1.415744      1.594576  1.693768 
#> 
#> Sample-level Random Effects
#> ---------------------------
#>    Groups       Name  Std.Dev.      Corr 
#>     group  Intercept  1.033171           
#>                   z1  1.033171  0.000000 
#>  Residual             1.033171           
#> 
#> Other Information
#> -----------------
#> Number of Obs: 873
#>        Groups: group , 25
print(model, table.style = "md")
#> Hierarchical and geographically weighted regression model
#> =========================================================
#> Formula: y ~ L(g1 + g2) + x1 + (z1 | group)
#>  Method: Back-fitting and Maximum likelihood
#>    Data: mulsam.test$data
#> 
#> Fixed Effects
#> -------------
#>  Intercept        x1 
#>   1.852190  1.967644 
#> 
#> Group-level Spatially Weighted Effects
#> --------------------------------------
#> Bandwidth: 10 (nearest neighbours)
#> 
#> Coefficient estimates:
#>  Coefficient        Min  1st Quartile     Median  3rd Quartile       Max 
#>    Intercept  -0.549094     -0.439522  -0.151433     -0.024133  0.178044 
#>           g1   0.909293      1.253143   1.692616      1.927313  2.310056 
#>           g2   1.083410      1.279953   1.415744      1.594576  1.693768 
#> 
#> Sample-level Random Effects
#> ---------------------------
#>    Groups       Name  Std.Dev.      Corr 
#>     group  Intercept  1.033171           
#>                   z1  1.033171  0.000000 
#>  Residual             1.033171           
#> 
#> Other Information
#> -----------------
#> Number of Obs: 873
#>        Groups: group , 25