similar to: create stratified splits

Displaying 20 results from an estimated 130 matches similar to: "create stratified splits"

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?
2010 Sep 14
0
stratified Wilcoxon's rank sum test with the locally best weights
Hello, I have been informed that there is no R package for the stratified Wilcoxon's rank sum test (Van Elteren's test) with the locally best weights. I need to use the alternative test to a clinical endpoint where the distribution approximate normal distribution, and compare to the regular ANOVA. I have been directed to use SAS with PROC FREQ with the SCORES=modridit option and CMH2
2004 Jun 08
0
bootstrap: stratified resampling
Dear All, I was writing a small wrapper to bootstrap a classification algorithm, but if we generate the indices in the "usual way" as: bootindex <- sample(index, N, replace = TRUE) there is a non-zero probability that all the samples belong to only one class, thus leading to problems in the fitting (or that some classes will end up with only one sample, which will be a problem
2004 Aug 11
1
Stratified Survival Estimates
Using R version 1.8.1 for Windows, I obtain an error message using the following code. The data frame was constructed in the counting process style, where V1 is the start time, V2 is the stop time, and V3 is the censoring indicator. There are no zero-length time intervals. Variable V4 is the stratification factor (gender: F,M). S<-Surv(V1,V2,V3) fit<-survfit(S ~ V4,data=test.dat)
2005 May 04
1
stratified bootstrap with boot
Hello, I am new to R, and am having trouble getting the output I want from a stratified bootstrap. I didn't recieve a reply the first time I posted this question so I have tried to make it more clear. My data frame (denboot) is set up as follows: SITE cswa parea treat 1 BeanA 3 1.20 m 2 BeanBC 3 1.05 m 3 BeanD 1 0.93 m 4 BlackB 1 1.01
2007 Oct 02
0
SVM: stratified cross-validation
Hi, Is there a way to do stratified cross-validation of Support Vector Machines? Regards, Kaustubh ____________________________________________________________________________________ the tools to get online. [[alternative HTML version deleted]]
2008 Mar 08
1
How to do multi-factor stratified sampling in R
Given a set of data with a number of variables plus a response, I'd like to obtain a randomized subset of the rows such that the marginal proportions of each variable are maintained closely in the subset to that of the dataset, and possibly maintaining as well the two-factor interaction marginal proportions as well for some pairs. This must be a common problem in data mining, but I
2008 Jul 30
1
odds ratios in multiway tables (stratified)
Hi, does anyone know of a function to calculate odds ratios in multiway tables (stratified) (+ the other usual statistics involved) i mean: say we have a table r*c*d, For every d (depth) we have a r*c table, and in this table the odds ratio's are calculated for every 2*2 subtable in it. logically this function would look like): ORs(multiwaytable) or ORs(data$var1r,data$var2c,data$var3d)
2008 Oct 31
1
stratified kappa (measure agreement or interrater reliability)?
Hi All: Could anyone point me to a package that can calculate stratified kappa? My design is like this, 4 raters, 30 types of diagnosis scores, 20 patients. Each rater will rate each patient for each type of diagnosis score. The rater's value is nominal. I know I can measure the agreement between raters for each type of diagnosis score, e.g., calculate out 30 kappa values. My problem is I
2008 Dec 11
1
How to generate a prediction equation for a stratified survival model that was fitted by cph() in Design package
Dear all, I used cph() function from Frank harrell's Design package to create a survival model, then used functions 'Function' and 'sascode' to generate prediction equation based on the saved survival model. But it failed. I included a stratified variable in the model. If I removed the stratification, they were working well. Does that mean that function 'Function'
2009 Jun 18
1
Stratified random sampling?
Rers: What is the preferred library/function for doing stratified random sampling from a dataset, given I want to control the number of samples (rather than the proportion of samples) per strata? Thanks! --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The Barn, Room
2011 May 13
0
routine for dependent correlation test with stratified random sample
Dear R-List,   I would like to have a large number of stratified random subsamples drawn from my dataframe and automatically test for correlation differences in every subsample.   Let this be my dataframe   df<-data.frame(group=c(rep(1,5),rep(2,5),rep(3,5)),a=c(3,4,5,6,3,4,5,4,5,4,1,2,1,2,1),b=c(1,2,3,4,5,3,4,3,4,5,6,5,6,2,3),c=c(2,2,3,3,5,1,1,6,6,5,6,1,1,2,1))   Then I would like to have n
2012 Jun 01
1
Stratified Sampling with randomForest Regression
Hi All, I'm using R's randomForest package (and it's quite awesome!) but I'd really like to do some stratified sampling with a regression problem. However, it appears that the package was designed to only accommodate stratified sampling for classification purposes (see https://stat.ethz.ch/pipermail/r-help/2006-November/117477.html). As Andy suggests in the link just
2013 Jan 10
1
SRS, Stratified, and Cluster sampling
Hi, Has anyone done (or know of) any nice R activities that help introductory students ( and teachers :) ) better understand the concepts of simple vs stratified vs cluster sampling? Any links? David -- View this message in context: http://r.789695.n4.nabble.com/SRS-Stratified-and-Cluster-sampling-tp4655099.html Sent from the R help mailing list archive at Nabble.com.
2013 Feb 14
1
stratified analysis
I am having trouble doing a stratified analysis while obtaining the mean,median, and standard deviation of each group. I have copied and pasted the console below. [[alternative HTML version deleted]]