Displaying 20 results from an estimated 554 matches for "stratas".
Did you mean:
strata
2015 Feb 04
2
Interpretación de coeficientes en un cox proportional hazards con variable strata
Buenas.
Abajo pongo la salida de un modelo de cox , dónde he estratificado por
una variable de país (Countryb) y por otra (Q6). Además hay interacción
entre la variable mobilityPDurG2 (es una variable 0,1, y 0 es la
categoría de referencia) país.
La categoría de referencia para país es "united kingdom".
Mi duda surge si quiero calcular el hazard ratio para los que tienen un
1
2011 Jan 25
1
NA replacing
...sum)[2]
where 12 is the value of x (id=7) in strata 2 where y=NA
instead of third NA tapply(na.exclude(df)$y,na.exclude(df)$strata,sum)[2]* *
8 */tapply(na.exclude(df)$x,na.exclude(df)$strata,sum)[2]
where 8 is the value of x(id=8) in strata 2 where y=NA.
So, I would like to replace NA inside the stratas on above explained way.
Does anyone know how to do this?
thanks in advance
Andrija
[[alternative HTML version deleted]]
2013 Jan 31
1
obtainl survival curves for single strata
Dear useRs,
What is the syntax to obtain survival curves for single strata on many subjects?
I have a model based on Surv(time,response) object, so there is a single row per subject and no start,stop and no switching of strata.
The newdata has many subjects and each subject has a strata and the survival based on the subject risk and the subject strata is needed.
If I do
newpred <-
2008 Dec 04
1
Comparing survival curves with "survdiff" "strata" help
ExpeRts,
I'm trying to compare three survival curves using the function "survdiff" in the survival package. Following is my code and corresponding error message.
> survdiff(Surv(st_months, status) ~ strata(BOR), data=mydata)
Error in survdiff(Surv(st_months, status) ~ strata(BOR), data = mydata) :
No groups to test
When I check the "strata" of the variable. I get .
2011 Feb 12
4
From SPSS Syntax to R code
There is a code from SPSS Syntax
do if sub(ATVK,2,2)="01".
comp strata=1.
else if sub(ATVK,2,2)>="05" and sub(ATVK,2,2)<="27".
comp strata=3.
else if sub(ATVK,4,2)>"20" or sub(ATVK,6,2)>"20".
comp strata=4.
else if sub(ATVK,4,2)>"00".
comp strata=2.
end if.
value labels strata 1 "R 2 "Li" 3 "M" 4
2011 May 06
2
coxph and survfit issue - strata
Dear users,
In a study with recurrent events:
My objective is to get estimates of survival (obtained through a Cox model) by rank of recurrence and by treatment group.
With the following code (corresponding to a model with a global effect of the treatment=rx), I get no error and manage to obtain what I want :
data<-(bladder)
2018 May 08
0
Fitting problem for Cox model with Strata as interaction term
Dear All,
I got a warning message "X matrix deemed to be singular" in Cox model with
a time dependent coefficient. In my analysis, the variable "SEX" is a
categorical variable which violate the PH assumption in Cox. I first used
the survSplit() function to break the data set into different time
intervals, and then fit the model. The procedures can be described as
follows:
2013 Dec 07
1
combine glmnet and coxph (and survfit) with strata()
Dear All,
I want to generate survival curve with cox model but I want to estimate the
coefficients using glmnet. However, I also want to include a strata() term
in the model. Could anyone please tell me how to have this strata() effect
in the model in glmnet? I tried converting a formula with strata() to a
design matrix and feeding to glmnet, but glmnet just treats the strata()
term with one
2003 Feb 12
2
Various Errors using Survey Package
Hi,
I have been experimenting with the new Survey package. Specifically, I was
trying to use some of the functions on the public-use survey data from NHIS
(2000 Sample Adult file).
Error 1): The first error I get is when I try to specify the complex survey
design.
nhis.design<-svydesign(ids=~psu, probs=~probs, strata=~strata, data=nhis.df,
check.strata=TRUE)
Error in svydesign(ids =
2006 Feb 07
2
getting strata/cluster level values with survey package?
First, I appoligise for the rooky question, but...
I'm trying to obtain standard errors, confidence intervals, etc. from a
sample design and have been trouble getting the results for anything other
than the basic total or mean for the overall survey from the survey
package.
For example, using the following dataset,
strata,cluster,vol
A,1,18.58556192
A,1,12.55175443
A,1,21.65882438
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>
2012 Feb 01
1
package sampling, function strata
Dear all,
I have to select 122 stratified random samples from a population of
>3900 cells. I have 41 strata and I have to draw a different number of
samples from them(between 2 and 8).
I have tried to apply the funtion strata following the instruction in
the manual:
strata(dataframe, stratanames=NULL, size, method=c("srswor"),
pik,description=TRUE)
but I get the error
2007 May 17
2
controling the size of vectors in a matrix
hie R users
l have the following matrix
n=20
m<-matrix(nrow=n,ncol=4)
colnames(m)=c("treatmentgrp","strata","survivalTime")
for(i in 1:n) m[i,]<-c(sample(c(1,2),1,replace=TRUE),sample(c(1:2),1,replace=TRUE),rexp(1,0.07),rexp(1,0.02))
2013 Feb 12
3
improving/speeding up a very large, slow simulation
Dear R help;
I'll preface this by saying that the example I've provided below is pretty
long, turgid, and otherwise a deep dive into a series of functions I wrote
for a simulation study. It is, however, reproducible and self-contained.
I'm trying to do my first simulation study that's quite big, and so I'll
say that the output of this simulation as I'd like it to be is
2010 Jun 26
1
boot with strata: strata argument ignored?
Hello All. I must be missing the really obvious here:
mm <- function(d, i) median(d[i])
b1 <- boot(gravity$g, mm, R = 1000)
b1
b2 <- boot(gravity$g, mm, R = 1000, strata = gravity$series)
b2
Both b1 and b2 seem to have done (almost) the same thing, but it looks like
the strata argument in b2 has been ignored. However, str(b1) vs str(b2)
does show that the strata have been noted
2010 Jul 20
1
Random Forest - Strata
Hi all,
Had struggled in getting "Strata" in randomForest to work on this.
Can I get randomForest for each of its TREE, to get ALL sample from some
strata to build tree, while leaving some strata TOTALLY untouched as oob?
e.g. in below, how I can tell RF to,
- for tree 1 in the forest, to use only Site A and B to build the tree,
while using the WHOLE Site C data for the oob error
2017 Dec 28
2
Why aov() with Error() gives three strata?
Dear list users,
I am trying to learn Repeated measures ANOVA using the aov() interface, but
I'm struggling to understand its output.
According to tutorials on the web, formula for a repeated measures design
is:
aov(Y ~ IV+ Error(SUBJECT/IV) )
This formula does work but it returns three strata (Error:SUBJECT, Error:
SUBJECT:IV, Error: Within), when I would expect two strata (Within and
2010 Jun 03
1
Question about avoid the for loop
Dear R-helpers,
I would like to generate a binary random variable within a stratum's
stratum. Here is a simple example.
## x is the first level strata index, here I have 3 strata.
x=c(rep(1,5), rep(2,5), rep(3,5))
## within x, there is a second strata indexed by t=0 and t=1
t=rep(c(0,0,1,1,1),3)
## and within strata i and t=0 and t=1, I generate the random binomial
variable respectively,
2007 Sep 06
3
Survey package
Good afternoon!
I'm trying to use the Survey package for a stratified sample which has 4 criteria on which the stratification is based. I would like to get the corrected weights and for every element i get a weight of 1
E.g: tipping
design <- svydesign (id=~1, strata= ~regiune + size_loc + age_rec_hhh + size_hh, data= tabel)
and then weights(design)
gives
2024 Sep 15
1
Possible update to survival
I got good feedback from the list about a scope issue, so I am coming back for more.
Prior issue: users who type survival::coxph(survival::Surv(time, status) ~ x1 + x2 + surv ival::strata(group), data=mydata)
This messes up the character string matching for strata, done via tt <- terms(formula, specials= ?strata?). The code runs, and gives the wrong answer (group is treated as an ordinary