stat.glm {ANTs} | R Documentation |

Performs Generalized Linear Models tests and computes permuted p-values

```
stat.glm(
ant,
oda,
formula,
family = "gaussian",
progress = TRUE,
start = NULL,
control = list(...),
model = TRUE,
method = "glm.fit",
x = FALSE,
y = TRUE,
contrasts = NULL,
...
)
```

`ant` |
an output of ANT function |

`oda` |
the original data frame of associations when argument ant is obtained with |

`formula` |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under 'Details'. |

`family` |
a description of the error distribution and link function to be used in the model. For glm this can be a character string naming a family function, a family function or the result of a call to a family function. For glm.fit only the third option is supported, see |

`progress` |
a boolean indicating the visualization of the permutation process. |

`start` |
starting values for the parameters in the linear predictor. |

`control` |
a list of parameters for controlling the fitting process. |

`model` |
a logical value indicating whether model frame should be included as a component of the returned value. |

`method` |
the method to be used in fitting the model. The default method "glm.fit" uses iteratively reweighted least squares (IWLS): the alternative "model.frame" returns the model frame and does no fitting. |

`x, y` |
For glm: logical values indicating whether the response vector and model matrix used in the fitting process should be returned as components of the returned value. |

`contrasts` |
an optional list. See the contrasts.arg of model.matrix.default. |

`...` |
Extra arguments for |

This function is the first step in the process to create a t-test in permuted data. For more details on t-tests, see R documentation.

Returns a list of 3 elements :

An object of class inheriting from "glm" which inherits from the class "lm".

A data frame if the estimates of the permuted models.

A vector of integers indicating the permutations that returned model errors or warnings (e.g. model convergence issues) and for which new permutations were done.

Sebastian Sosa, Ivan Puga-Gonzalez.

Dobson, A. J. (1990) An Introduction to Generalized Linear Models. London: Chapman and Hall.

Hastie, T. J. and Pregibon, D. (1992) Generalized linear models. Chapter 6 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.

McCullagh P. and Nelder, J. A. (1989) Generalized Linear Models. London: Chapman and Hall.

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. New York: Springer.

```
t=met.degree(sim.m, sym = TRUE,sim.df,1) # Computing network metric
t=perm.net.nl(t,labels='age',rf=NULL,nperm=10,progress=FALSE) # Node label permutations
r.glm=stat.glm(ant = t,formula = degree ~ age,progress=FALSE) # Permuted GLM
```

[Package *ANTs* version 0.0.16 Index]