Displaying 20 results from an estimated 100 matches similar to: "ANOVA for stratified cox regression"
2008 Jan 15
1
Anova for stratified Cox regression
Dear List,
I have tried a stratified Cox Regression, it is working fine, except for
the "Anova"-Tests:
Here the commands (should work out of the box):
library(survival)
d = colon[colon$etype==2, ]
m = coxph(Surv(time, status) ~ strata(sex) + rx, data=d)
summary(m)
# Printout ok
anova(m, test='Chisq')
This is the output of the anova command:
> Analysis of Deviance Table
2010 Aug 06
1
[OT] R on Atlas library
Dear List,
I am aware this is slightly off-topic, but I am sure there are people who already had the problem and who perhaps solved it.
I am running long-lasting model fits using constrOptim command. At work
there is a linux computer (Quad Core, debian) on which I already have
compiled R and Atlas, in the hope that things will go faster on that
machine.
Atlas offers the possibility to be
2020 Nov 04
2
sprintf, check number of parameters
Dear Tomas,Thank you.Regarding the "unnumbered" arguments, i.e. sprintf('%f %f', 1, 2, 3). This was the case I wanted to report, here a warning can be very useful.Regarding the "numbered" arguments, that is, sprintf('%$1f %$3f', 1, 2, 3). Here, omission of an argument might be intended, for example, in an application with support for multiple languages.
2020 Nov 04
0
sprintf, check number of parameters
Dear Matthias,
On 11/4/20 4:01 PM, matthias-gondan wrote:
> Dear Tomas,
>
> Thank you.
>
> Regarding the "unnumbered" arguments, i.e. sprintf('%f %f', 1, 2, 3).
> This was the case I wanted to report, here a warning can be very useful.
>
> Regarding the "numbered" arguments, that is, sprintf('%$1f %$3f', 1,
> 2, 3). Here, omission
2017 Sep 02
0
Strange lazy evaluation of default arguments
Dear Bill,
All makes perfect sense (including the late evaluation). I actually discovered the problem by looking at old code which used your proposed solution. Still I find it strange (and, hnestly, I don?t like R?s behavior in this respect), and I am wondering why u is not being copied to L just before u is assigned a new value. Of course, this would require the R interpreter to track all these
2017 Sep 02
2
Strange lazy evaluation of default arguments
Another way to avoid the problem is to not redefine variables that are
arguments. E.g.,
> Su3 <- function(u=100, l=u, mu=0.53, sigma2=4.3^2, verbose)
{
if (verbose) {
print(c(u, l, mu))
}
uNormalized <- u/sqrt(sigma2)
lNormalized <- l/sqrt(sigma2)
muNormalized <- mu/sqrt(sigma2)
c(uNormalized, lNormalized, muNormalized)
}
> Su3(verbose=TRUE)
2017 Sep 02
0
Strange lazy evaluation of default arguments
Hello,
One way of preventing that is to use ?force.
Just put
force(l)
right after the commented out print and before you change 'u'.
Hope this helps,
Rui Barradas
Citando Matthias Gondan <matthias-gondan at gmx.de>:
> Dear R developers,
>
> sessionInfo() below
>
> Please have a look at the following two versions of the same function:
>
> 1. Intended
2012 Feb 22
1
line width in legend of interaction.plot
Dear R developers,
The following command produces an interaction plot with lwd=2.
interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2)
In the legend, however, lwd seems to be 1, which does not seem
to be intended behavior. Probably the lwd is not correctly forwarded
to legend:
from the interaction.plot source:
legend(xleg, yleg, legend = ylabs, col = col, pch = if (type %in%
2012 Oct 09
1
ylim with only one value specified
Dear R developers,
I would like to have R choose the limits of the y-axis semi-automatically,
e.g., zero should be included, but the maximum should be chosen depending
on the data.
Examples:
plot(1:10, 1:10) # selects min and max automatically
plot(1:10, 1:10, ylim=c(1, 10)) # manual definition
plot(1:10, 1:10, ylim=c(0, Inf)) # this would be a nice feature, i.e. lower y limit = 0 defined
2011 Feb 03
1
random sequences for rnorm and runif
Dear R experts,
For a fixed seed, the first random number produced by rnorm and runif
has the same rank within the distribution, which I find useful. The
following ranks differ, however.
> set.seed(123)
> runif(4)
[1] *0.2875775* 0.7883051 *0.4089769* 0.8830174
> set.seed(123)
> pnorm(rnorm(4))
[1] 0.2875775 0.4089769 0.9404673 0.5281055
I noticed that rnorm seems to
2012 Jan 17
2
Reference for dataset colon (package survival)
Dear R team, dear Prof. Therneau,
library(survival)
data(colon)
?colon
gives me only a very rudimentary source (only a name). Is there a
possibility to get a reference to the clinical trial these data
are taken from?
Many thanks in advance. With best wishes,
Matthias Gondan
--
2017 Sep 05
0
Strange lazy evaluation of default arguments
Mathias,
If it's any comfort, I appreciated the example; 'expected' behaviour maybe, but a very nice example for staff/student training!
S Ellison
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Matthias
> Gondan
> Sent: 02 September 2017 18:22
> To: r-help at r-project.org
> Subject: [R] Strange lazy evaluation of
2020 Nov 04
0
sprintf, check number of parameters
Dear Matthias,
thanks for the suggestion, R-devel now warns on unused arguments by
format (both numbered and un-numbered). It seems that the new warning is
useful, often it finds cases when arguments were accidentally passed to
sprintf but had been meant for a different function.
R allows combining both numbered and un-numbered references in a single
format, even though it may be better to
2017 Sep 02
6
Strange lazy evaluation of default arguments
Dear R developers,
sessionInfo() below
Please have a look at the following two versions of the same function:
1. Intended behavior:
> Su1 = function(u=100, l=u, mu=0.53, sigma2=4.3^2)
+ {
+ print(c(u, l, mu)) # here, l is set to u?s value
+ u = u/sqrt(sigma2)
+ l = l/sqrt(sigma2)
+ mu = mu/sqrt(sigma2)
+ print(c(u, l, mu))
+ }
>
> Su1()
[1] 100.00 100.00 0.53
[1]
2004 Oct 21
0
Hmisc: Using stratified weighted means (wtd.mean) within a function
Hello list,
I have the following function which, as you can see, uses mean:
meanratings <- round(apply(stack03[,c(102:121)],2,function(x) (tapply(x ,actcode, mean, na.rm=T))), digits=1)
The above function yields the following output:
q27a q27b q27c q27d q27e q27f q27g q27h q27i q27j q27k q27l q27m q27o q27p
1 7.8 8.1 7.7 7.9 7.9 NaN NaN 8.4 7.8 7.0 7.6 NaN NaN 7.1 6.0
2
2007 May 17
1
Stratified Cox proportional Hazard Model
Hello everyone,
I am a new user of R. Does anybody know how hazard ratios are extracted
for each factor level in a stratified Cox proportional hazard
regression model? I have a cancer data set where the variable
?differentiation? is a factor with three levels: poor, intermediate and
good. I would like to extract the hazard ratio for each grade level and
relate it to another prognostic factor.
2008 Jul 16
2
Stratified random sample
An embedded and charset-unspecified text was scrubbed...
Name: n?o dispon?vel
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080716/4aec957e/attachment.pl>
2006 Sep 07
0
stratified poisson regression
Hello,
I'm fitting poisson regression to mortality data and wish to stratify by age.
Is there any way to perform this stratification and use the glm function in R?
Thanks,
Hannah Murdoch
2005 Aug 28
2
stratified Wilcoxon available?
Dear All,
is there a stratified version of the Wilcoxon test (also known as van
Elteren test) available in R?
I could find it in the survdiff function of the survival package for
censored data. I think, it should be possible to use this function creating
a dummy censoring indicator and setting it to not censored, but may be
there is a better way to perform the test.
Thanks,
Heinz T??chler
2004 Apr 06
0
fit.contrast or some other for interactions and stratified
I was trying to do a bunch of planned contrast but ran into a snag.
fit.contrast won't work with an Error term in aov. Ok, then I use lme.
Only, now it seems there is no way to enter the interaction terms
(something like "x1:x2"). I couldn't find a way to use the interaction
term in the help. Is there an undocumented method or some other
command for planned contrasts?