stap_glm.fit.RdFitting Generalized Linear STAP models
stap_glm.fit(y, z, dists_crs, u_s, times_crs, u_t, weight_functions, stap_data, max_distance = max(dists_crs), max_time = max(times_crs), weights = rep(1, NROW(y)), offset = rep(0, NROW(y)), family = stats::gaussian(), ..., prior = normal(), prior_intercept = normal(), prior_stap = normal(), group = list(), prior_theta = list(theta_one = normal()), prior_aux = cauchy(location = 0L, scale = 5L), adapt_delta = NULL)
| y | n length vector or n x 2 matrix of outcomes  | 
    
|---|---|
| z | n x p design matrix of subject specific covariates  | 
    
| dists_crs | (q_s+q_st) x M matrix of distances between outcome observations and built environment features with a hypothesized spatial scale  | 
    
| u_s | n x (q *2) matrix of compressed row storage array indices for dists_crs  | 
    
| times_crs | (q_t+q_st) x M matrix of times where the outcome observations were exposed to the built environment features with a hypothesized temporal scale  | 
    
| u_t | n x (q*2) matrix of compressed row storage array indices for times_crs  | 
    
| weight_functions | a Q x 2 matrix with integers coding the appropriate weight function for each STAP  | 
    
| stap_data | object of class "stap_data" that contains information on all the spatial-temporal predictors in the model  | 
    
| max_distance | the upper bound on any and all distances included in the model  | 
    
| max_time | the upper bound on any and all times included in the model  | 
    
| weights | weights to be added to the likelihood observation for a given subject  | 
    
| offset | offset term to be added to the outcome for a given subject  | 
    
| family | distributional family - only binomial gaussian or poisson currently allowed  | 
    
| ... | optional arguments passed to the sampler - e.g. iter,warmup, etc.  | 
    
| prior, prior_intercept, prior_stap, prior_theta, prior_aux | see   | 
    
| group | list of of group terms from   | 
    
| adapt_delta | See the adapt_delta help page for details.  |