Re: [R] Fixing the coefficient of a regressor in formula

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 28 May 2008 17:24:56 +0100 (BST)

See ?offset

On Wed, 28 May 2008, Marie-Pierre Sylvestre wrote:

> Dear R users,
>
> I want to estimate a Cox PH model with time-dependent covariates so I am
> using a counting process format with the following formula:
>
> Surv(data$start, data$stop, data$event.time) ~ cluster(data$id) + G1 + G2 +
> G3 + G4 + G5 +G6
>
> Gs represent a B-spline basis functions so they sum to 1 and I can't
> estimate the model as is without getting the last coefficient to be NA, which
> makes sense given the perfect collinearity.
>
> without getting in lengthy details about my code, let me just say that to
> avoid the colinearity problem,. I do not want to omit G1 from the
> regression. Instead, I want to fix the regression coefficient of one of the
> regressors, G1, to 1.
>
> I have read the R manual section on formulae but I have not found how to do
> fix a regression coefficient.

I am not sure what section this is, but offset() is an advanced topic (just like cluster()).

> Conceptually speaking it seems to me that it
> should be simple, and I am sure that someone explained it somewhere, but I
> did not find the proper keywords to find it!
>
> So, does someone know how to fix the coefficient of a regressor in the
> formula for Cox model so that the coefficient is not estimated but still
> taken into account?
>
> Thank you in advance,
>
> MP
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 28 May 2008 - 17:45:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 May 2008 - 18:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive