**470**wrote:

In R, you can do "summary(glm(y ~ x))" and it displays the results of the glm including the intercept, slope and the p-values for the intercept and the slope. But how can you programmatically retrieve the p-value for the slope? For instance, I would like to do something like the following:

```
rst <- glm(y ~ x)
rst$pvalue
```

Or, alternatively, a perl package with the desired capability. I've checked out Statistics::LineFit, however it can only return rSquared but not p-value

**20**• written 3.9 years ago by moxu •

**470**