gwbr {gwbr}R Documentation

Geographically Weighted Beta Regression

Description

Fits a local regression model for each location using the beta distribution, recommended for rates and proportions, using a parametrization with mean (transformed by the link function) and precision parameter (called phi). For more details see Da Silva and Lima (2017).

Usage

gwbr(
  yvar,
  xvar,
  lat,
  long,
  h,
  data,
  xglobal = NA_character_,
  grid = data.frame(),
  method = c("fixed_g", "fixed_bsq", "adaptative_bsq"),
  link = c("logit", "probit", "loglog", "cloglog"),
  distancekm = TRUE,
  global = FALSE,
  maxint = 100
)

Arguments

yvar

A vector with the response variable name.

xvar

A vector with descriptive variable(s) name(s).

lat

A vector with the latitude variable name.

long

A vector with the longitude variable name.

h

The bandwidth parameter.

data

A data set object with yvar and xvar.

xglobal

A vector with descriptive variable(s) name(s) with global effect.

grid

A data set with the location variables. Only used when the location variable are in another data set, different from data set used in parameter data. Variable name "lat" is expected for latitude and "long" for longitude.

method

The kernel function used. The options are: "fixed_g", "fixed_bsq" or "adaptive_bsq". The default is "fixed_g".

link

The link function used in modeling. The options are: "logit", "probit", "loglog" or "cloglog". The default is "logit".

distancekm

Logical. If TRUE use the distance in kilometers otherwise, use the Euclidean distance. The default is TRUE.

global

Logical. If TRUE return to global model, giving the results from betareg_gwbr function. The default is FALSE.

maxint

A maximum number of iterations to numerically maximize the log-likelihood function in search of the parameter estimates. The default is maxint=100.

Value

A list that contains:

Examples


data(saopaulo)
output_list=gwbr("prop_landline",c("prop_urb", "prop_poor"),"y","x",116.3647,saopaulo)

## Descriptive statistics of the parameter estimates
output_list$parameter_estimates_desc

## Table with all parameter estimates and your respective statistics
output_list$parameters


[Package gwbr version 1.0.5 Index]