search for: trial

Displaying 20 results from an estimated 3004 matches for "trial".

Did you mean: arial
2003 Dec 09
2
PROC MIXED vs. lme()
I'm trying to learn how to do a repeated measures ANOVA in R using lme(). A data set that comes from the book Design and Analysis has the following structure: Measurements (DV) were taken on 8 subjects (SUB) with two experimental levels (GROUP) at four times (TRIAL). In SAS, I use the code: PROC MIXED DATA=[data set below]; CLASS sub group trial; MODEL dv = group trial group*trial; REPEATED trial / SUBJECT=sub TYPE=CS; run; which gives the results: Tests of Fixed Effects Source NDF DDF Type III F Pr > F GROUP 1 6...
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 patient...
2009 Mar 10
1
Nesting order for mixed models
...d about the order of nesting in mixed models using functions like aov(), lme(), lmer(). I have the following data: n subjects in either condition A or B each subject tested at each of 3 numerical values ("distance" = 40,50,60), repeated 4 times for each of the 3 numerical values ("trial" = 1,2,3,4) Variable summary: Condition: 2 level factor Distance: numerical (but only 3 values) in the same units as "y" Trial: 4 level factor I expect the subjects' data to differ due to condition and distance, and am doing repeated measurements to reduce any variability due...
2008 May 30
2
inconsistent output when using variable substitution
I am extremely puzzled by this behavior in R. I have a data frame called Trials in which I have results from an experiment. I am trying to do a subjects analysis, but getting weird results. Each row has 1 trial in it, which includes a column for the subject number I get the list of subject numbers like so: > Subj=unique(sort(Trials$Subj)) Then I loop over them. But I ge...
2009 May 11
3
aggregate over x cases
Hello, I have been struggling for quite some time to find a solution for the following problem. I have a data frame which is organized by block and trial. Each trial is represented across several rows in this data frame. I'd like to extract the first x rows per trial and block. For example block trial x y 1 1 1 605 150 2 1 1 603 148 3 1 1 604 140 4 1 1 600 140 5 1 1 590 135 6 1 1 580 135 7 1 2 607 148 8 1 2 605 152 10 1 2 600 158 ..... Selec...
2009 Nov 06
3
Calculate Mean for each Treatment/Trial Interaction in DF
Hi, I am create a new DF that summarizes the mean angle per treatment/trial, of the original DF (see below). I have had some success using: (tapply(df$Angle, INDEX=interaction(df$State, df$Trial), FUN=mean)); however, this gives the answer as a list, which means I would have to split the name to get the categories back. Does anyone know a simple way to transform the Ori...
2012 Nov 22
0
Mixed models and learning curves
...e time per each log was registered, the sum of the 5 logs' cycle time was giving the replication time. We had 6 replication per subject . I would like to predict the time necessary to perform the task. I have been modelling the time to perform the task (prod.time)versus the replication number (Trial-in the dataset), the previous experience (factor) and their interaction. As random effect I have been using the subjects. > ma<-lme(prod.time~Trial+Previous.experience+Trial*Previous.experience, data= Data27_04, random=~1|Student, method="ML") > summary(ma) Linear mixed-effec...
2003 Sep 03
0
TOAD Trial License Key
...art your use of TOAD and get a free TOAD T-shirt! Every Tuesday morning at 8 a.m. PT, a member of the TOAD technical team walks you through the product. To register - just visit www.quest.com/knowtoad at your convenience. Your sales representative can also arrange a personalized walk through. TOAD TRIAL AUTHORIZATION KEYS: Please choose the Trial Key that corresponds with the TOAD TRIAL VERSION you downloaded. These trial keys are good for 30 days and will allow you to use the product configuration(s) that you have selected. =========================================================== TOAD 7.5 S...
2017 Oct 24
0
Issue of reproducibility with gam and lm.wfit in different versions of R
...###################################################################### #1 R 3.1.2 (x86_64-redhat-linux-gnu (64-bit)) / gam 1.09.1 ###################################################################### > step.object <- step.gam(gam.object, scope=scope, trace=2) Start: y ~ 1; AIC= 797.0034 Trial: y ~ x1 + 1 ; AIC= -5121.796 Trial: y ~ 1 + x2 ; AIC= 796.915 Step:1 y ~ x1 ; AIC= -5121.796 Trial: y ~ ns(x1, df=2) + 1 ; AIC= -5123.816 Trial: y ~ x1 + x2 ; AIC= -5174.408 Step:2 y ~ x1 + x2 ; AIC= -5174.408 Trial: y ~ ns(x1, df=2) + x2 ; AIC= -5164.829 > is.null(step.object) [1] FALSE...
2010 Sep 23
2
Error: attempt to apply non-function
This code worked fine for me, then did some cleaning up of formatting using ESS (Emacs) and now I get this error, no idea what is causing it, all the brackets/parentheses seem to be balanced. What have I done wrong? Thanks Jim p0.trial01 <- 0.25 TruOR01 <- 0.80 num.patients.01 <- 50 num.trials.01 <- 5 LOR01.het.in <- 0.00 num.sims <- 1 simLOR01 <- vector(length=num.trials.01) simLORSE01 <- vector(length=num.trials.01) simOR01 <- vector(length=num.trials.01) trialnum01 <- vector(length=num.trials.01)...
2010 Sep 19
2
working with eval and environments
I'm trying to get the following section of code to work, I think the problem is being caused by the assignment of data to the lm function not evaluating to "train" in the parent environment but I can't seem to figure out how to do this. fitmodel <- function(trial,data) { wrap.lm <- function(formula,data,...) { cat("in wrap lm",NROW(data),"\n"); lm(formula,data,...) } wrap.step <- function(object,scope,...) { cat("in wrap step",NROW(train),"\n"); step(object,scope,...) } train <- data[1:trial at n,] nul...
2005 Oct 12
1
step.gam and number of tested smooth functions
...143S~ALC,data=dane,family=binomial) > step.gam.ALC<-step.gam(gam.object.ALC,scope=list("ALC"=~1+ALC+s(ALC,2)+s(ALC,3)+s(ALC,4)+s(ALC,6)+s(ALC,8)+lo(ALC,degree=1,span=.5)+lo(ALC,degree=2,span=.5)+lo(ALC,degree=1,span=.25)+lo(ALC,degree=2,span=.25))) Start: X143S ~ ALC; AIC= 104.0815 Trial: X143S ~ 1; AIC= 111.1054 Trial: X143S ~ s(ALC, 2); AIC= 103.3325 Step : X143S ~ s(ALC, 2) ; AIC= 103.3325 Trial: X143S ~ s(ALC, 3); AIC= 102.9598 Step : X143S ~ s(ALC, 3) ; AIC= 102.9598 Trial: X143S ~ s(ALC, 4); AIC= 102.2103 Step : X143S ~ s(ALC, 4) ; AIC= 102.2103 Trial: X143S ~...
2009 May 12
3
What's the best way to tell a function about relevant fields in data frames
Hi list, I have a function that detects saccadic eye movements in a time series of eye positions sampled at a rate of 250Hz. This function needs three vectors: x-coordinate, y-coordinate, trial-id. This information is usually contained in a data frame that also has some other fields. The names of the fields are not standardized. > head(eyemovements) time x y trial 51 880446504 53.18 375.73 1 52 880450686 53.20 375.79 1 53 880454885 53.35 376.14 1 54 88045...
2008 Sep 15
1
Help... Organizing multiple spreadsheets data into a huge R data structure!
...to the R program, and I hope some of you can offer me some suggestions on how to organize my data in R using some of the more advanced data structuring technique. Here's my scenario: I have date set of 50 participants (each with conditions and demographic data), each participant performed 2x16 trials, for each trial, there was specific information about the trial (i.e. errors, and timing), and a spreadsheet-like large data set with headers. I have to extract data from each spreadsheet-like data according to the information about the specific trial. And then group then according to trial nature...
2008 Dec 08
3
Transforming a string to a variable's name? help me newbie...
Dear all, I'm a newbie in R. I have a 45x2x2x8 design. A dataframe stores the metadata of trials. And each trial has its own data file: I used "read.table" to import every trial into R as a dataframe (variable). Now I dynamically ask R to retrieve trials that fit certain selection criteria, so I use "subset", e.g. tmptrialinfo <- subset(trialinfo, (Subject==24 & Fi...
2003 Feb 26
2
na.action in model.tables and TukeyHSD
Hello everybody! I use R 1.6.2 in Windows, and have a problem controlling the na.action. In a dataset with twelve trials, one of the trials lack any readings of the variable "STS.SH" (standing power at harvest) Fitting an aov() object with the call: led1t7sts.aov <- aov(STS.SH ~ Trial/Block + Treatment + Treatment:Trial, data = led1t7, na.action=na.exclude) seems to work as it produces an object with...
2012 Nov 01
4
Select the last rows of when specific conditions are met.
Hello, As I am new with R I am completely stuck in resolving a, no doubt, easy problem. I have a dataset with an enormous amount of rows and 17 columns. I need to know per trial and subject number if another variable (tt) exceeds a maximum. If this is true than the last 5000 rows of that specific trial for that subject number needs to be deleted. But I am completely stuck on how to do so. After various attempts I have finally come up with the following (which obviously d...
2011 Apr 22
1
Survival analysis: same subject with multiple treatments and experience multiple events
Hi there, I need some help to figure out what is the proper model in survival analysis for my data. Subjects were randomized to 3 treatments in trial 1, some of them experience the event during the trial; After period of time those subjects were randomized to 3 treatments again in trial 2, but different from what they got in 1st trial, some of them experience the event during the 2nd trial (I think the carryover effect can be ignored since the t...
2010 Feb 02
2
Subset and plot
Here is a runable program. When I plot Day and Wgt, it graphs all the data points. All I need is daily.sub1 plotted. I also need each "Tanks" to have its own col or pch. When I run it with the line with pch, it gives me nothing. rm(list=ls()) Trial<-rep(c(1,2),each=12) Tanks=rep(c("a3","a4","c4","h4"),each=3,2) Day=rep(c(1:12),2) Wgt=c(1:24) daily<-cbind(Trial, Tanks, Day, Wgt) daily daily.sub<-subset(daily, subset=Trial==2 & Tanks=="a4"|Trial==2 & Tanks=="c4"|Trial=...
2008 Nov 30
1
help: unbalanced repeated measures
Hi folks, I am trying to figure out how run a repeated measures ANOVA on the following data set. subject trial frequency dplvl 1 FSI052A A 1 NA 2 FSI052B B 1 NA 3 FSI053A A 1 NA 4 FSI055A A 1 NA 5 FSI055B B 1 NA 6 FSI057A A 1 NA 7 FSI057B B 1 NA 8 FSI058A A 1 NA 9 FSI058B B...