[R] Breakpoints for multiple variables using Segmented
Matthew Betts
m.betts at unb.ca
Wed Jan 18 21:37:42 CET 2006
Hi all,
I am using the package Segmented to estimate logistic regression models
with unknown breakpoints (see Muggeo 2003 Statistics in Medicine
22:3055-3071). In the documentation it suggests that it might be possible to
include several variables with breakpoints in the same model: Z = a vector
or a matrix meaning the (continuous) explanatory variable(s) having
segmented relationships with the response. However, the syntax for
including multiple Z and psi (starting values for the break-point(s))
is not stated. Does anyone have any suggestions?
Here is an example of correct code for detecting single breakpoint:
model.seg<-segmented.glm(obj = model.glm, Z = predictor_variable, psi = 2 ,
it.max = 50)
Thanks very much for your help.
Matthew G. Betts, Ph.D.
NB Cooperative Fish and Wildlife Research Unit
Faculty of Forestry and Environmental Management
University of New Brunswick
UNB Tweedale Centre
Hugh John Flemming Forestry Complex
1350 Regent St., Fredericton, N.B.
E3C 2G6
(506) 447-3408
http://www.unb.ca/web/acwern/people/mbetts/mbetts.htm
More information about the R-help
mailing list