search for: outcomes

Displaying 20 results from an estimated 2459 matches for "outcomes".

Did you mean: outcome
2012 Aug 17
3
Error: level sets of factors are different?
Why the error is coming? even though the length of outcome.new$compkey and outcome.new$armkey were exactly same. Can anyone help? setwd("D:/AZ") library("RODBC") cdb_cnct <- odbcConnectExcel("AZIF_DC_GVK_NSCLC_MSALL_287papers_02072012_141450_v1_4.xls") outcomes <- sqlFetch(cdb_cnct, "Outcomes_info") odbcClose(cdb_cnct) rm(cdb_cnct) sink("Dependency checks.log") outcomes[(outcomes$Comparator != 9999), ] -> outcome compkey <- paste(outcome$Comparator, outcome$Comparator_Subarm, sep='_') armkey <- paste(outcome$Arm_ID,...
2009 Mar 04
2
Selecting one row or multiple rows per ID
Hi, Could someone help with coding this in R? I need to select one row per patient i in clinic j. The data is organized similar to that shown below. Two columns - patient i in column j identify each unique patient. There are two columns on outcome. Some patients have multiple rows with each row representing one visit, coded for in the column, visit. Some patients have just one row indicating
2009 Jan 30
1
simulating outcomes - categorical distribution (?)
Hi, I am simulating an event that has 15 possible outcomes and I have a vector 'pout' that gives me the probability of each outcome - different outcomes have different probabilities. Does anyone know a simple way of simulating the outcome of my event? If my event had only two possible outcomes (0/1) I would pick a uniform random number between 0 a...
2008 Feb 03
1
Effect size of comparison of two levels of a factor in multiple linear regression
...etermine confidence intervals for the effect sizes derived below and would appreciate tips on that. set.seed(123456) # Make session reproducible # Set up the treatment factor with three levels and 100 observations # each treatment <- factor(c(rep(0, 100), rep(1, 100), rep(2, 100))) # Simulate outcomes outcome <- rep(NA, 300) outcome[treatment==0] <- rnorm(100, 10, 5) # baseline: mean=10, sd=5 outcome[treatment==1] <- rnorm(100, 30, 5) # effect size 4 outcome[treatment==2] <- rnorm(100, 40, 5) # effect size 6 # Check effect sizes (Cohen's d) cohens.d <- function (x, y) {(mean(...
2010 Jun 02
1
how to label the som notes by the majority vote
HI, Dear R community, I am using the following codes to do the som. I tried to label the notes by the majority vote. either through mapping or prediction. I attached my output, the left one dont have any labels in the note, the right one has more than one label in each note. I need to have only one label for each note either by majority vote or prediction. Can anyone give some suggestions or
2012 Jun 27
1
Replacing sets of rows in matrix within a loop
Dear R-help, I am writing some simulation code to create multiple sets of time-to-event clinical trial data (for use in meta-analysis). Within each trial, I want to apply censoring via simulation of uniform variables (with minimum zero and maximum the median outcome time for that particular trial). I have started by pre-allocating a matrix which has 3 columns; one for trial number, one for
2010 Nov 17
1
efficient conversion of matrix column rows to list elements
Hi List, I'm hoping to get opinions for enhancing the efficiency of the following code designed to take a vector of probabilities (outcomes) and calculate a union of the probability space. As part of the union calculation, combn() must be used, which returns a matrix, and the parallelized version of lapply() provided in the multicore package requires a list. I've found that parallelization is very necessary for vectors of outcomes...
2010 Jun 03
1
problem with 'svyby' function from SURVEY package
Hello, I'm using a complex survey dataset and my goal is to simply spit out a bunch of probability-weighted outcome variable means for the different levels of covariate. So I first define the structure of the study design (I'm using the CDC's NHANES data): dhanes <- svydesign(id=~PSU, strat=~STRATA, weight=~lab_weight, data=final, nest=TRUE) No problem there. Now I use the
2009 Nov 07
1
lme4 and incomplete block design
Dear list members, I try to simulate an incomplete block design in which every participants receives 3 out of 4 possible treatment. The outcome in binary. Assigning a binary outcome to the BIB or PBIB dataset of the package SASmixed gives the appropriate output. With the code below, fixed treatment estimates are not given for each of the 4 possible treatments, instead a kind of summary
2015 May 28
2
La ejecución de mi script R es muy lenta
...si R es lento en esta > operación o es que mi código no está optimizado y no estoy haciéndolo de la > forma correcta. > El código de mi programa es el siguiente: > > > #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ## Set-A.csv y Outcomes.csv deben estar en el directorio actual > # Transforma csv a data frame > seta <- read.csv('Set-A.csv'); > outcomes <- read.csv('Outcomes-A.csv'); > > ids <- as.character(unique(outcomes$RecordID)); > ## Número de RecordsID distintos > Length_ids <-...
2015 May 29
3
Mi script R es muy lento
Hola, quiero compartir con vosotros mi problema y la solución que me han planteado. Mi programa carga Outcomes.csv y Set-A.csv (descargados de http://garrickadenbuie.com/blog/2013/04/11/visualize-physionet-data-with-r/, apartado Getting Started --> the code and the data set) de unos 50MB entre los dos. Mi código era: # Transforma csv a data frame seta <- read.csv('Set-A.csv'); outcomes &lt...
2009 Sep 04
3
Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1
Hello, I am using R to analyze a large multilevel data set, using lmer() to model my data, and using anova() to compare the fit of various models. When I run two models, the output of each model is generated correctly as far as I can tell (e.g. summary(f1) and summary(f2) for the multilevel model output look perfectly reasonable), and in this case (see below) predictor.1 explains vastly more
2015 May 28
2
La ejecución de mi script R es muy lenta
Hola, Si no tienes inconveniente en compartir tu conjunto de datos (puedes dejarlo en un Dropbox y compartir enlace) o incluir una salida de la variables: "seta" y "outcomes" (función "save.image()") con eso podemos darte alguna solución mucho más rápida que la que planteas. En tu código con un bucle estás tratando de rellenar una lista que son los diferentes agregados y esto se puede hacer mucho más rápido (segundos) con varios paquetes: data.table, dp...
2010 Oct 31
1
Questions about Probit Analysis
...me mydatanew (see some of its entries below) > mydatanew x1 successes failures 1 220 0 1 2 300 1 2 3 340 1 3 4 360 0 4 5 380 0 8 [...................] where for every value of x1 I count the number of 0 and 1 outcomes (namely number of failures and number of successes). This is equivalent to having a full list of x1 values with an associated 0/1 outcome (I have simply counted them) hence it is all the info I need to again perform a logit regression of the binary outcome on x1, but the data format is now dif...
2011 Feb 08
1
Error in example Glm rms package
Hi all! I've got this error while running example(Glm) library("rms") > example(Glm) Glm> ## Dobson (1990) Page 93: Randomized Controlled Trial : Glm> counts <- c(18,17,15,20,10,20,25,13,12) Glm> outcome <- gl(3,1,9) Glm> treatment <- gl(3,3) Glm> f <- glm(counts ~ outcome + treatment, family=poisson()) Glm> f Call: glm(formula = counts ~
2010 Jun 22
1
Generalised Estimating Equations on approx normal outcome with limited range
Dear R users I am analysing data from a group of twins and their siblings. The measures that we are interested in are all correlated within families, with the correlations being stronger between twins than between non-twin siblings. The measures are all calculated from survey answers and by definition have limited ranges (e.g. -5 to +5), though within the range they are approximately normally
2010 Dec 14
1
rpart - how to estimate the “meaningful” predictors for an outcome (in classification trees)
...re relevant for other outcome variables (y's only). *How can it be estimated, which explanatory variable is "used" for which of the predicted value in the outcome variable?* Here is an example code in which x2 is the only important variable for predicting "b" (one of the y outcomes). There is no predicting variable for "c", and x1 is a predictor for "a", assuming that x2 permits it. How can this situation be shown using the an rpart fitted model? N <- 200 set.seed(5123) x1 <- runif(N) x2 <- runif(N) x3 <- runif(N) y <- sample(letters[1...
2008 Mar 05
1
CROSSOVER TRIALS IN R (Binary Outcomes)
...tic. Suppose as an example, we have 4 subjects undergoing a crossover design, where the outcome is either success or failure. The first two subjects receive treatment "A" first followed by treatment "B". The remaining two subjects receive treatments in the reverse order. The outcomes for the subjects is the sequence "AB" are as follows: (0,1) and (0,0). While the outcomes for the subjects in the sequence "BA" are (1,1) and (1,0). How can i analyse this using R. I have done the problem with PROC NLMIXED in SAS, I simply want to compare the results from SA...
2006 Jun 18
1
how to successfully remove missing values for a repeated measures analysis
Hello , I am hoping for some advice. I want to run a repeated measures ANOVA. The primary problem is that my attempt to remove missing values created a dataset of missing values. The data set consists of 92 rows (1 row per participant) x 186 variables. The steps of the analysis undertaken are outlined below (#). Any assistance is appreciated in relation to how to remove the missing values so
2006 Nov 10
3
Confidence interval for relative risk
The concrete problem is that I am refereeing a paper where a confidence interval is presented for the risk ratio and I do not find it credible. I show below my attempts to do this in R. The example is slightly changed from the authors'. I can obtain a confidence interval for the odds ratio from fisher.test of course === fisher.test example === > outcome <- matrix(c(500, 0, 500, 8),