glmCoin {netCoin}R Documentation

Regression Graphs

Description

produces a netCoin object from a set of glm regressions.

Usage

glmCoin(formulas, data, weights=NULL, pmax=.05, 
                    twotail=FALSE, showArrows=TRUE,
                    frequency = FALSE, percentage = TRUE, 
                    color="variable", lwidth="z.value", 
                    circle= NA, language=c("en","es","ca"),
                    igraph=FALSE, ...)

Arguments

formulas

A set of formulas separated, folowed by the family and a return. For example: model <- "counts ~ outcome + treatment, poisson counts ~ outcome, poisson"

data

Data frame containing the variables in the model.

weights

Optional vector of weights to be used in the fitting process.

pmax

Selection of links with Pr(>|z|) less than p (one-tail by default).

twotail

Logical value indicating if twotail test must be appied. Defaul=FALSE.

showArrows

a logical value true if the directional arrows are to be shown. Default = FALSE.

frequency

a logical value true if frequencies are to be shown. Default=FALSE.

percentage

a logical value true if percentages are to be shown. Default=TRUE.

color

Nodes' attribute to be used for expressing color ("variable" by default).

lwidth

Nodes' attribute to be used for widht of arrows ("z.value" by default).

circle

Degre of rotation in case of fixed circled dependent variables.

language

Language of the graph controls.

igraph

Produces an igraph object instead of a netCoin object if TRUE.

...

Any netCoin argument.

Value

This function creates a netCoin object (or igraph) and, if stated, a folder in the computer with an HTML document named index.html which contains the produced graph. This file can be directly opened with your browser and sent to a web server to work properly.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

## Dobson (1990) Page 93: Randomized Controlled Trial :
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
Dobson <- data.frame(counts=counts, outcome=outcome, treatment=treatment)
model <- "counts ~ outcome + treatment, poisson"
glmCoin(model,Dobson)

[Package netCoin version 2.0.48 Index]