Displaying 20 results from an estimated 10000 matches similar to: "alternative to logistic regression"
2008 Dec 23
6
Interval censored Data in survreg() with zero values!
Hello,
I have interval censored data, censored between (0, 100). I used the
tobit function in the AER package which in turn backs on survreg.
Actually I'm struggling with the distribution. Data is asymmetrically
distributed, so first choice would be a Weibull distribution.
Unfortunately the Weibull doesn't allow for zero values in time data,
as it requires x > 0. So I tried the
2009 Aug 01
2
Cox ridge regression
Hello,
I have questions regarding penalized Cox regression using survival
package (functions coxph() and ridge()). I am using R 2.8.0 on Ubuntu
Linux and survival package version 2.35-4.
Question 1. Consider the following example from help(ridge):
> fit1 <- coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1), ovarian)
As I understand, this builds a model in which `rx' is
2013 Jun 12
2
survreg with measurement uncertainties
Hello,
I have some measurements that I am trying to fit a model to. I also
have uncertainties for these measurements. Some of the measurements
are not well detected, so I'd like to use a limit instead of the
actual measurement. (I am always dealing with upper limits, i.e. left
censored data.)
I have successfully run survreg using the combination of well detected
measurements and limits,
2015 Apr 23
3
model frames and update()
This issue has arisen within my anova.coxph routine, but is as easily illustrated with glm.
testdata <- data.frame(y= 1:5,
n= c(8,10,6,20,14),
sex = c(0,1,0,1,1),
age = c(30,20,35,25,40))
fit <- glm(cbind(y,n) ~ age + sex, binomial, data=testdata, model=TRUE)
saveit <- fit$model
update(fit, .~. - age, data=saveit)
2011 May 11
2
changes in coxph in "survival" from older version?
Hi all,
I found that the two different versions of "survival" packages, namely 2.36-5
vs. 2.36-8 or later, give different results for coxph function. Please see
below and the data is attached. The second one was done on Linux, but Windows
gave the same results. Could you please let me know which one I should trust?
Thanks,
...Tao
#####============================ R2.13.0,
2013 Oct 09
1
frailtypack
I can't comment on frailtypack issues, but would like to mention that coxme will handle
nested models, contrary to the statement below that "frailtypack is perhaps the only ....
for nested survival data".
To reprise the original post's model
cgd.nfm <- coxme(Surv(Tstart, Tstop, Status) ~ Treatment + (1 | Center/ID), data=cgd.ag)
And a note to the poster-- you should
2009 Feb 25
3
survival::predict.coxph
Hi,
if I got it right then the survival-time we expect for a subject is the
integral over the specific survival-function of the subject from 0 to t_max.
If I have a trained cox-model and want to make a prediction of the
survival-time for a new subject I could use
survfit(coxmodel, newdata=newSubject) to estimate a new
survival-function which I have to integrate thereafter.
Actually I thought
2011 Mar 09
2
Anomaly with unique and match
I stumbled onto this working on an update to coxph. The last 6 lines
below are the question, the rest create a test data set.
tmt585% R
R version 2.12.2 (2011-02-25)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
# Lines of code from survival/tests/singtest.R
> library(survival)
Loading required package: splines
2007 Nov 15
3
not R question : alternative to logistic regression
I was just curious if anyone knew of an alternative model to logistic regression where the probabilities seems pretty linear to the predictor rather than having that S shape that probit and logit assume.
Maybe there is there some kind of other GLM that could accomplish that. Any textbook references or suggestions
are appreciated. I have most of the texts but if someone knows of a text that talks
2008 Jul 23
1
Questions on weighted least squares
Hi all,
I met with a problem about the weighted least square regression.
1. I simulated a Normal vector (sim1) with mean 425906 and standard deviation 40000.
2. I simulated a second Normal vector with conditional mean b1*sim1, where b1 is just a number I specified, and variance proportional to sim1. Precisely, the standard deviation is sqrt(sim1)*50.
3. Then I run a WLS regression without the
2010 Nov 11
2
predict.coxph and predict.survreg
Dear all,
I'm struggling with predicting "expected time until death" for a coxph and
survreg model.
I have two datasets. Dataset 1 includes a certain number of people for which
I know a vector of covariates (age, gender, etc.) and their event times
(i.e., I know whether they have died and when if death occurred prior to the
end of the observation period). Dataset 2 includes another
2008 Jan 29
2
Direct adjusted survival?
Hello,
I am trying to find an R function to compute 'direct adjusted survival'
with standard errors. A SAS-macro to do this is presented in Zhang X,
Loberiza FR, Klein JP, Zhang MJ. A SAS macro for estimation of direct
adjusted survival curves based on a stratified Cox regression model.
Comput Methods Programs Biomed 2007;88:95-101. It appears that this
method is not implemented in R.
2010 Oct 27
2
coxph linear.predictors
I would like to be able to construct hazard rates (or unconditional death prob) for many subjects from a given survfit.
This will involve adjusting the ( n.event/n.risk)
with (coxph object )$linear.predictors
I must be having another silly day as I cannot reproduce the linear predictor:
fit <- coxph(Surv(futime, fustat) ~ age, data = ovarian)
fit$linear.predictors[1]
[1] 2.612756
2024 Jun 26
2
Fixing a CRAN note
I am trying to clear up all the "NOTE"s before a CRAN submission, but am a bit confused
about this one.?? What is it complaining about -- that it doesn't like my name?
...
* checking for file ?deming/DESCRIPTION? ... OK
* this is package ?deming? version ?1.4-1?
* checking CRAN incoming feasibility ... [7s/18s] NOTE
Maintainer: ?Terry Therneau <therneau.terry at mayo.edu>?
2006 Sep 05
3
terms.inner
Question:
I am trying to impliment a function in R that we use quite regularly in
Splus, and it fails due to a lack of the "terms.inner" function in R.
The substitute is?
Part question and part soapbox:
Why remove terms.inner from R? It's little used, but rather innocuous.
Mostly soapbox:
I figured it was no big deal, as I originally discovered the use of
terms.inner from
2011 Jan 23
1
Offset - usersplits function package RPART
Hi,
I would like write a split function to implement a new split method with the package RPART.
I see that I can define my split function as specified in the example of usersplits function, but I don't understand how I can use the variable "offsets". What is the meaning of these variable?
Thank's
Michela
2016 Apr 15
4
simple interactions
I'd like to get interaction terms in a model to be in another form. Namely, suppose I had
variables age and group, the latter a factor with levels A, B, C, with age * group in the
model. What I would like are the variables "age:group=A", "age:group=B" and
"age:group=C" (and group itself of course). The coefficients of the model will then be
the age effect
2020 Sep 25
1
Extra "Note" in CRAN submission
When I run R CMD check on the survival package I invariably get a note:
...
* checking for file ?survival/DESCRIPTION? ... OK
* this is package ?survival? version ?3.2-6?
* checking CRAN incoming feasibility ... NOTE
Maintainer: ?Terry M Therneau <therneau.terry at mayo.edu>?
...
This is sufficient for the auto-check process to return the following failure message:
Dear maintainer,
2006 Nov 16
1
getting a title in a plot during an lapply
In my code below tempa and tempb are numeric vectors that I combined
into a dataframe along with the deciles of tempa.
I have an lapply statement that goes through the dataframe and does ten
plots according to the appropriate decile.
The code is below and it works fine. There are no bugs so I figure there
was no need to include structure statements on the data.
Also, I don't want to use coplot
2005 Apr 21
2
Deciles and R
Hi everyone,
I'm a new R user (if this is a really basic question, please do excuse
me...) and I'm having some questions regarding a deciles problem.
I have a variable which I need to categorize according to its deciles (X).
However, this categorization should be made into another variable (call it
NewVar).
Ex. for the quartiles case (just for the sake of exposition, since I need