hi isabel,
You have to decide if focus is on the survival curves or hazards..
Crossing hazards do not imply crossing survival curves
If you are dealing with crossing hazards, and you are interested in
testing for an effect of a covariate (presumably with a crossing hazard
effect), then a stan
tructure and I believe that fitting a piecewise regression would be of great
benefit.
Thanks,
Lucas
On Jun 6, 2012, at 4:54 AM, Vito Muggeo (UniPa) wrote:
dear lucas,
yes you are right, segmented does not handle 'lars' objects.
Out of curisity, are you interested in selecting the nu
dear lucas,
yes you are right, segmented does not handle 'lars' objects.
Out of curisity, are you interested in selecting the number of
breakpoints or in selecting additional covariates with linear parameters?
vito
Il 06/06/2012 0.01, Lucas Santana dos Santos ha scritto:
Hi All,
I am tryi
dear Peter,
Currently segmented handles multiple breakpoints for several variables
(the limit discussed in the msg 2006 has been fixed..).
However you are looking for a somewhat complicated model where the
breakpoint of the relationship 's.size' and 'R.AUC' depends on another
covariate 'bedek
dear all,
I do not if it is a nonsense question..
Is it possible in the R session to get the name of the current .Rdata
file that I ran?
I mean: suppose I double click the file myfile.Rdata. ls() returns the
names of the objects in the current workspace (that is saved in
myfile.Rdata). In th
dear Peter,
Your code appears correct, so it is difficult to reply without the data..
If you are interested in further details, please contact me off-list
vito
Il 25/05/2012 15.34, Peter Hoitinga ha scritto:
Hello all,
I've been having trouble with assessing a breakpoint in a logistic GLM
wi
dear Szymon,
what do you mean
"it does not work for others.. that fit within similar range"?
Each dataset has its own features and breakpoint estimation is not as
simple as estimation of linear models even if your data "fit within
similar range".
I will contact you out of the list for detai
dear Szymon,
it is a bug (in the new version), thanks. It depends on the flat
underlying relationship you are trying to estimate with a small sample..
I will correct it as soon as possible. Meanwhile you can use
o1<-glm(gpp ~ temp)
os1<-segmented(o1, seg.Z=~temp, psi=15, control=seg.control(n.
there are at least two alternatives
1) package dglm for Double generalized linear models
or probably better
2)package gamlss for Generalized Additive Models for Location Scale and
Shape. Here you can use alternative, sometimes more appropriate,
families and also you can include additive (nonp
dear Christofer,
Try the following
d<-expand.grid(a=1:3,b=1:4)
d$freq<-rpois(12,5)
o<-glm(freq~factor(a)+factor(b)+I(a*b), family=poisson, data=d)
vito
Il 02/04/2012 9.34, Christofer Bogaso ha scritto:
Dear all, can somebody give me some pointer how I can fit a
"linear-by-linear association
dear all,
It appears that glmnet(), when "selecting" the covariates entering the
model, skips from K covariates, say, to K+2 or K+3. Thus 2 or 3
variables are "added" at the same time and it is not possible to obtain
a ranking of the covariates according to their importance in the model.
On t
dear Julian,
Il 18/01/2012 14.36, crimsonengineer87 ha scritto:
Thanks for the comments. Yes, I also had segmented and then I went away from
that. I can't remember. I've tried using it but I get some sort of strange
error. Here's some code ...
it is difficult for me to help you without knowin
dear all,
apologizes for this off-topic question.
I am looking for a "ecological" dataset (n>100, say) including
measurements of one or more growth variable and age.
Could anyone to suggest the R package/URL where I can find it?
many thanks,
vito
--
Vit
dear Phil,
I am not able to read the error message.. did you forget it?
However: does x exist in the workspace?
The following lines work:
myreg2 = lm(y ~ x, data=xy)
mysegmented = segmented(myreg2, seg.Z=~x, psi=c(245000))
myreg2 = lm(xy$y ~ xy$x)
x<-xy$x
mysegmented = segmented(myreg2, seg.Z=
dear Philip,
I am not able to solve your problem, however the error message you get
does not depends on mgcv::gam, therefore gam(,..outer.ok=TRUE) or
predict.gam(,outer.ok=TRUE) do not make sense.
The error message comes from the function splines::splineDesign which is
called when the option
dear Nick,
getAnywhere("plot.glmnet")
Note the message you get when you type
methods(plot)
...
>>> Non-visible functions are asterisked
Il 28/01/2011 14.26, Nick Sabbe ha scritto:
Hello list.
I was trying to see some of the code for plot.glmnet in package glmnet (this
function name i
It appears that you have a 2x2 table coming from paired binary data..
If this is the case the McNemar test is appropriate.
See
?mcnemar.test
or even better the package exact2x2, function mcnemar.exact() for an
"exact" approach,
vito
Il 18/01/2011 14.40, debz ha scritto:
Hi I was wonderi
hi feng,
a possible solution is
b1<-apply(a,2,list)
and possibly
lapply(b1,unlist)
if you want exactly the output equal to "list(a[, 1], a[, 2])"
best,
vito
Il 18/01/2011 13.53, Feng Li ha scritto:
Dear R,
Is there an efficient way to make a list that each element is from the
corresponding
dear M.,
I do not know how to get the SE for the joinpoint (or breakpoint) from
your ljr fit. However you can find useful the segmented package which
works for any GLM (including the logistic one) and it returns
(approximate) StErr (and Conf Int) also for the joinpoint (breakpoint in
the segme
dear Vincy,
Firstly, a suggestion: to increase the probability of getting help, you
should provide reproducible code (people can do "copy-and-paste" of your
code and to modify the code to obtain the response.. )
However a possible solution (not tested, of course..) could be simply
a<-tapply(r
dear all,
I would like to get the lme call without fitting the relevant model.
library(nlme)
data(Orthodont)
fm1 <- lme(distance ~ age, random=list(Subject=~age),data = Orthodont)
To get fm1$call without fitting the model I use call():
my.cc<-call("lme.formula", fixed= distance ~ age, random =
Hi Karen,
I think you should decide what you mean for "interaction". s(x:y) is
meaningless
If you want to fit a surface you should use s(x,y).
If you want to fit a varying coefficient model (interaction between a
linear and a smooth term) you should use the argument by in s().
The help file
dear Tonja,
By plotting your data
plot(df)
it seems to me that you are looking for a piecewise linear
relationships. If this is the case, have a look to the package
segmented. You have to specify or not the number and the starting values
for the breakpoints
library(segmented)
olm<-lm(waleve
dear all,
When I use all.vars(), I am interest in extracting only the variable names..
Here a simple example
all.vars(as.formula(y~poly(x,k)+z))
returns
[1] "y" "x" "k" "z"
and I would like to obtain
"y" "x" "z"
Where is the trick?
many thanks
vito
--
Vi
dear all,
This is a probably a silly question.
If I type
> grep("x",c("a.x" ,"b.x","a.xx"),value=TRUE)
[1] "a.x" "b.x" "a.xx"
Instead, I would like to obtain only
"a.x" "b.x"
How is it possible to get this result with grep()?
many thanks for your attention,
best,
vito
--
There are at least two R packages dealing with changepoint estimation,
segmented and strucchange.
Two possible relevant papers are available:
1)Journal of Statistical Software for strucchange (2002, Vol.7, Issue2)
2)Rnews for segmented (2008, 8/1: 20-25)
Hope this helps you
vito
FMH ha scritt
dear Dan,
As far as I know, the strucchange package can be helpful for you..
On the other hand, if your regression function is continuous at the
unknown break points to be estimated, you could try the segmented package.
Hope this helps you,
vito
Daniel Brewer ha scritto:
Hello,
I would lik
I think that the (impressive) gamlss package (see
http://www.gamlss.com) may be helpful.
If I remember correctly, in gamlss you can fit model with zero-inflated
continuous distributions
hope this helps you,
vito
Alain Zuur ha scritto:
JPS2009 wrote:
Sorry bit of a Newbie question, and I
dear Alex,
I think your problem with a large number of predictors and a relatively
small number of subjects may be faced via some regularization approach
(ridge or lasso regression..)
hope this helps you,
vito
Alex Roy ha scritto:
Dear All,
I have a matrix say, X ( 100 X 40
dear anna,
if you are not interested in point estimate and SE of the parameter of
the aforementioned categorical variable, I believe the conventional
glm(..,family=binomial) is correct. In particular, the returned deviance
is reliable and also it is the relevant likelihood ratio test..
hope t
Hi,
Although Bacon&Watts (1971) assume a transition, the aim is to estimate
the breakpoint where the linear relationship changes. The start- and
end-point of the transition phase are not parameters to estimate ; it is
a trick to estimate the model.
As a possible alternative, you could have a
31 matches
Mail list logo