Description Usage Arguments Details Value Author(s) References See Also Examples

This function performs a penalized likelihood ratio test on some (or all) selected factors. The resulting object is of the class logistftest and includes the information printed by the proper print method.

1 | ```
logistftest(object, test, values, firth = TRUE, beta0, weights, control)
``` |

`object` |
a fitted logistf object |

`test` |
righthand formula of parameters to test (e.g. |

`values` |
null hypothesis values, default values are 0. For
testing the specific hypothesis B1=1, B4=2, B5=0 we specify |

`firth` |
use of Firth's (1993) penalized maximum likelihood ( |

`beta0` |
specifies the initial values of the coefficients for the fitting algorithm. |

`weights` |
case weights |

`control` |
control parameters for iterative fitting |

This function performs a penalized likelihood ratio test on some (or all) selected factors. The resulting object is of the class logistftest and includes the information printed by the proper print method. Further documentation can be found in Heinze & Ploner (2004).

In most cases, the functionality of the logistftest function is replaced by `anova.logistf`

, which is a more
standard way to perform likelihood ratio tests. However, as shown in the example below, `logistftest`

provides
some specials such as testing agains non-zero values. (By the way, `anova.logistf`

calls `logistftest`

.)

A `print`

method is available.

The object returned is of the class logistf and has the following attributes:

`testcov` |
a vector of the fixed values of each covariate; NA stands for a parameter which is not tested. |

`loglik` |
a vector of the (penalized) log-likelihood of the full and the restricted models. If the argument beta0 not missing, the full model isn't evaluated. |

`df` |
the number of degrees of freedom in the model. |

`prob` |
the p-value of the test. |

`call` |
the call object |

`method` |
depending on the fitting method ‘Penalized ML’ or ‘Standard ML’. |

`beta` |
the coefficients on the restricted solution. |

Georg Heinze

Firth D (1993). Bias reduction of maximum likelihood estimates. *Biometrika*
80, 27–38.

Heinze G, Ploner M (2004). Technical Report 2/2004: A SAS-macro, S-PLUS library and R package to perform logistic regression without convergence problems. Section of Clinical Biometrics, Department of Medical Computer Sciences, Medical University of Vienna, Vienna, Austria. http://www.meduniwien.ac.at/user/georg.heinze/techreps/tr2_2004.pdf

Heinze G (2006). A comparative investigation of methods for logistic regression
with separated or nearly separated data. *Statistics in Medicine* 25: 4216-4226.

1 2 3 4 5 |

```
logistftest(object = fit, test = ~vic + vicl - 1, values = c(2,
0))
Model fitted by Penalized ML
Factors fixed as follows:
(Intercept) age oc vic vicl vis
NA NA NA 2 0 NA
dia
NA
Likelihoods:
Restricted model Full model difference
-144.49700 -132.53938 11.95762
Likelihood ratio test=23.91523 on 2 df, p=6.410225e-06
```

logistf documentation built on May 30, 2017, 5:25 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.