search for: strat

Displaying 20 results from an estimated 129 matches for "strat".

Did you mean: stat
2024 May 15
2
Extracting values from Surv function in survival package
OS X R 4.3.3 Colleagues I have created objects using the Surv function in the survival package: > FIT.1 Call: survfit(formula = FORMULA1) n events median 0.95LCL 0.95UCL SUBDATA$ARM=1, SUBDATA[, EXP.STRAT]=0 18 13 345 156 NA SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=1 13 5 NA 186 NA SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=2 5 5 168 81 NA SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=3 1 1 22 NA NA I am interested in extracting the ?n? and ?events...
2015 Jun 15
2
Different behavior of model.matrix between R 3.2 and R3.1.1
Terry - your example didn't demonstrate the problem because the variable that interacted with strata (zed) was not a factor variable. But I had stated the problem incorrectly. It's not that there are too many strata terms; there are too many non-strata terms when the variable interacting with the stratification factor is a fact...
2015 Jun 15
2
Different behavior of model.matrix between R 3.2 and R3.1.1
Terry - your example didn't demonstrate the problem because the variable that interacted with strata (zed) was not a factor variable. But I had stated the problem incorrectly. It's not that there are too many strata terms; there are too many non-strata terms when the variable interacting with the stratification factor is a fact...
2024 May 16
1
Extracting values from Surv function in survival package
...> OS X > R 4.3.3 > > Colleagues > > I have created objects using the Surv function in the survival package: >> FIT.1 > Call: survfit(formula = FORMULA1) > > n events median 0.95LCL 0.95UCL > SUBDATA$ARM=1, SUBDATA[, EXP.STRAT]=0 18 13 345 156 NA > SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=1 13 5 NA 186 NA > SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=2 5 5 168 81 NA > SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=3 1 1 22 NA NA > > I am interested in extra...
2017 Oct 19
2
Select part of character row name in a data frame
...ing to a condition, which is a part of a row name of the table. The data frame is made of 64 rows and 2 columns, but the row names are very long but I need to select them according to a small part of it and perform calculations on the subsets. This is the example: X Y "Unique to strat " 0.0482 28.39 "Unique to crt.dummy " 0.0441 25.92 "Unique to gender " 0.0159...
2015 Jun 16
1
Different behavior of model.matrix between R 3.2 and R3.1.1
Terry Therneau has been very helpful on r-help but we can't figure out what change in R in the past months made extra columns appear in model.matrix when the terms object is subsetted to remove stratification factors in a Cox model. Terry has changed his logic in the survival package to avoid this issue but he requires generating a larger design matrix then dropping columns. A simple example is below. strat <- function(x) x d <- expand.grid(a=c('a1','a2'), b=c('...
2017 Oct 19
2
Select part of character row name in a data frame
Thanks a lot, so simple so efficient! I will study more the grep command I did not know. Thanks! Francesca Pancotto > Il giorno 19 ott 2017, alle ore 12:12, Enrico Schumann <es at enricoschumann.net> ha scritto: > > df[grep("strat", row.names(df)), ] [[alternative HTML version deleted]]
2009 Oct 01
5
How to use Subpopulation data?
...r Helpers   I have a sample frame and i have sampled from it using three methods and now i want to calculate the statistics but i only get the population parameters.   H <- matrix(rnorm(100, mean=50000, sd=5000)) sampleframe=data.frame(type=c(rep("H",100)),value=c(H)) sampleframe   str=strata(sampleframe,c("type"),size=c(20,), method="srswor") sample.strat<-getdata(sampleframe,str) sample.strat length(H) i get:   length(H) [1] 100 Desire to get: length(H) [1] 20   Best Regards     [[alternative HTML version deleted]]
2017 Oct 19
0
Select part of character row name in a data frame
...ure to get clear on the difference between matrices and data frames in the Introduction to R document that comes with R. There are many ways to create numeric vectors, character vectors, and logical vectors that can then be used as indexes, including the straightforward way: df[ c( "Unique to strat ", "Unique to strat:crt.dummy ", "Common to strat, and crt.dummy ", "Common to strat, and gender ", "Common to strat, and age ") ,] -- Sent from my phone. Please excuse my brevity. On October 19,...
2010 Apr 29
2
Rotating Titles
Hi All, I am looking for help in rotating species titles produced using the strat.plot( ) function in the rioja package. This function produces a stratigraphic plot of paleoenvironmental data. Currently the titles of each species are plotted vertically while they are typically plotted at a 45 degree angle in other programs. Does anyone have any idea of how to rotates these ti...
2011 Mar 10
2
using lapply
I have a function with the follow signare: apply.strategy(instr, strat) where instr and strat are both objects of classes instrument and strategy respectively. I want to apply this function to a list that holds objects of the class instrument. Currently I am doing this by explicit looping: for(i in length(instr.list) ) { apply.strategy(instr.li...
2017 Oct 19
0
Select part of character row name in a data frame
...ow name of the table. > > The data frame is made of 64 rows and 2 columns, but the row names > are very long but I need to select them according to a small part of > it and perform calculations on the subsets. > > This is the example: > X Y > "Unique to strat " > 0.0482 28.39 > "Unique to crt.dummy " > 0.0441 25.92 > "Unique to gender "...
2011 Aug 19
1
adding text to a plot created with strat.plot() from package rioja
I have a plot created with strat.plot() from package rioja. When the plot is created with scale.percent=FALSE, each x axes is labeled at 0 and its maximum. However, when scale.percent=TRUE, the x axes are not labeled. I need to use scale.percent=TRUE and I need labels for the x axes. I have been able to add labels to t...
2008 Jun 17
3
Capturing coxph warnings and errors
Hi, I have a script that takes a subset of genes on a microarray and tries to fit a coxph model to the expression values for each gene. This seems to work fine but in some cases it produces warnings and/or errors. For example: Error in fitter(X, Y, strats, offset, init, control, weights = weights, : NA/NaN/Inf in foreign function call (arg 6) In addition: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Ran out of iterations and did not converge In this situation I would like to: 1) Deal with it so that it...
2005 Oct 12
1
Problem with a barplot...
Hello, I'm having a bit of a problem with a plot, and I'm hoping that someone might be able to help. I'm running the R Cocoa Gui v1.12 on OS X 10.4.2, and I'm doing a stacked bar plot. The plot itself is quite simple: barplot(as.matrix(s.strats.in),main="Strategy when strong", col=strat.col) where s.strats.in is a matrix with a number of rows that define the height of each stacked bar. However, ever since I expanded the number of columns from 100 to 500, the borders of the bars are overwhelming the plot (the bars are proporti...
2007 Mar 27
0
Error when calling residual.plots() on an ANOVA object
...mponents in the design of my algorithm. I have done a full factorial design for the following 5 factors (my response variable is "best"): $ model :'data.frame': 3360 obs. of 6 variables: ..$ best : num [1:3360] 0.108 0.573 0.625 1.057 0.451 ... ..$ comm.strat: Factor w/ 4 levels "FC","HC","R",..: 1 1 1 1 1 1 1 1 1 1 ... ..$ migr.freq : Factor w/ 2 levels "d","s": 1 1 1 1 1 1 1 1 1 1 ... ..$ max.cpu : Ord.factor w/ 2 levels "4"<"8": 1 1 1 1 1 1 1 1 1 1 ... ..$ instanc...
2004 Sep 09
2
Rd syntax error detected in CRAN daily checks
...es with syntax errors: /var/mnt/hda3/R.check/r-devel/PKGS/Design/man/Design.trans.Rd: unterminated section 'alias' The .Rd file is attached. It begins with \name{Design.trans} \alias{Design.trans} \alias{asis} \alias{pol} \alias{lsp} \alias{rcs} \alias{catg} \alias{scored} \alias{strat} \alias{matrx} \alias{\%ia\%} \title{ Design Special Transformation Functions } \description{ This is a series of functions (\code{asis}, \code{pol}, \code{lsp}, .... No error is detected when I run CMD CHECK using the latest R-devel locally, using the 5 Sep 04 version. I would appreciate assist...
2007 May 04
3
Error in if (!length(fname) || !any(fname == zname)) { :
Dear R users, I tried to fit a cox proportional hazard model to get estimation of stratified survival probability. my R code is as follows: cph(Surv(time.sur, status.sur)~ strat(colon[,13])+colon[,18] +colon[,20]+colon[,9], surv=TRUE) Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed Here colon[,13] is the one that I want to strat...
2006 Nov 20
1
Proportional data with categorical explanatory variables
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: https://stat.ethz.ch/pipermail/r-help/attachments/20061120/73240e63/attachment.pl
2007 Feb 05
1
ran out of iteration in coxph
hi, I applied coxph to my matrix of 300 samples and 215 variables and got the following error Error in fitter(X, Y, strats, offset, init, control, weights = weights, : NA/NaN/Inf in foreign function call (arg 6) In addition: Warning message: Ran out of iterations and did not converge in: fitter(X, Y, strats, offset, init, control, weights = weights, 26% of time data is censored and here is the result of dens...