home *** CD-ROM | disk | FTP | other *** search
-
- _R_e_g_r_e_s_s_i_o_n _f_o_r _a _p_a_r_a_m_e_t_r_i_c _s_u_r_v_i_v_a_l _m_o_d_e_l
-
- survreg(formula, data=sys.parent(), subset, na.action,
- link=c("log", "identity"),
- dist=c("extreme", "logistic", "gaussian", "exponential"),
- fixed, eps=0.0001, init, iter.max=10, model=F, x=F, y=F, ...)
-
- _A_r_g_u_m_e_n_t_s:
-
- formula:
- a formula expression as for other regression models.
- See the documentation for lm and formula for details.
-
- data:
- optional data frame in which to interpret the variables
- occuring in the formula.
-
- subset:
- subset of the observations to be used in the fit.
-
- na.action:
- function to be used to handle any NAs in the data.
-
- link:
- transformation to be used on the y variable.
-
- dist:
- assumed distribution for the transformed y variable.
-
- fixed:
- a list of fixed parameters, most often just the scale.
- (When I implement the t-dist, it will include the
- degrees of freedom).
-
- eps:
- convergence criteria for the computation. Iteration
- continues until the relative change in log likelihood
- is less than eps.
-
- init:
- optional vector of initial values for the paramters.
-
- iter.max:
- maximum number of iterations to be performed.
-
- model:
- if TRUE, the model frame is returned.
-
- x:
- if TRUE, then the X matrix is returned.
-
- y:
- if TRUE, then the y vector (or survival times) is
- returned.
-
- all the optional arguments to lm, including
- singular.ok.
-
- Value:
-
- an object of class survreg is returned, which inherits
- from class glm.
-
- This routine is not as robust against nearly singular
- X matrices as lm(); the problem occurs when we expli-
- citly invert the covariance matrix with solve(). This
- can sometimes be solved by subtracting the mean from
- all continuous covariates.
-
- _E_x_a_m_p_l_e_s:
-
- survreg(Surv(futime, fustat) ~ ecog.ps + rx, fleming, dist='extreme',
- link='log', fixed=list(scale=1)) #Fit an exponential
-
-