search for: drugs

Displaying 20 results from an estimated 721 matches for "drugs".

Did you mean: drug
2008 Nov 17
1
Type III ANOVA of package car depends on factor level order
## Question1: How to define IV with interaction alone, without main effects? ## Question2: Should Type III ANOVA in package car be independent of the factor level order? ## data from http://www.otago.ac.nz/sas/stat/chap30/sect52.htm drug <- c(t(t(rep(1,3)))%*%t(1:4)); disease <- c(t(t(1:3)) %*% t(rep(1,4))); y <- t(matrix(c( 42 ,44 ,36 ,13 ,19 ,22 ,33 ,NA ,26 ,NA ,33 ,21 ,31 ,-3 ,NA
2018 May 04
2
Regression model fitting
Hi all , I have a dataframe (Hypertension) with following headers :- > Hypertension ID Hypertension(before drug A) Hypertension(On drug A) On drug B? Healthy diet? 1 160 90 True True 2 190
2006 Jul 07
4
How to change the type of segments ends?
Hi, I am trying to plot odds ratios and the corresponding confidence intervals in horizontal segments. It would be ideal if the confidence interval segment can be drawn with little vertical bars at both ends. I have tried very hard to change the type of ends by using 'lend' arguments, but cannot make it. I even tried 'arrows()', but still failed. Following is the code I use:
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
Hello All, I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order. My data have a variable called "RowNo" that functions almost like a
2006 May 30
1
max / pmax
...ug of choice for each subject. I have just a few missing values on that variable. Instead of using a multiple imputation method like chained equations, I would prefer to derive these values from other survey responses. Specifically, I have a frequency of use (in days) for each of the major drugs, so I would like the missing values to be replaced by that drug with the highest level of use. I am starting with the "ifelse" and "max" statements, but I know it is wrong: impute.primary.drug <- ifelse(is.na(primary.drug), max(marijuana, crack, cocaine, heroin), prima...
2012 Oct 31
3
expand.grip for permutations
if i were to have a block size of 4 people and i want to assign a treatment combination to the entire block, there would be 16 different treatment combinations (TTTT, TTTP, TTPP, PTTP, etc.) i am trying to get all 16 permutations and i am able to use this code below. drugs=c('P','T'); comb=expand.grid(drugs,drugs,drugs,drugs) for a block size of 3 the code would be comb=expand.grid(drugs,drugs,drugs) and for a block size of 2 it would be comb=expand.grid(drugs,drugs). my question is whether there is a way to automatically create the comb variable. i...
2018 Mar 05
2
data analysis for partial two-by-two factorial design
Hi Bert, I am very sorry to bother you again. For the following question, as you suggested, I posted it in both Biostars website and stackexchange website, so far no reply. I really hope that you can do me a great favor to share your points about how to explain the coefficients for drug A and drug B if run anova model (response variable = drug A + drug B). is it different from running three
2018 Mar 05
5
data analysis for partial two-by-two factorial design
David: I believe your response on SO is incorrect. This is a standard OFAT (one factor at a time) design, so that assuming additivity (no interactions), the effects of drugA and drugB can be determined via the model you rejected: For example, if baseline control (no drugs) has a response of 0, drugA has an effect of 1, drugB has an effect of 2, and the effects are additive, with no noise we would have: > d <- data.frame(drugA = c("n","y","y"),drugB = c("n","n","y")) > y <- c(0,1,3) And a strai...
2018 Mar 02
3
data analysis for partial two-by-two factorial design
Dear R users, I need to analyze data generated from a partial two-by-two factorial design: two levels for drug A (yes, no), two levels for drug B (yes, no); however, data points are available only for three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. I think we can not investigate interaction between drug A and drug B,
2018 Mar 05
0
data analysis for partial two-by-two factorial design
...my collaborator did it and I only got chance to analyze the data. There are nine dishes of cells. Three replicates for each treatment combination. So randomly select three dishes for no drug A/no drug B treatment, a second three dishes for drug A only, then last three dishes to add both A and B drugs. After drug treatments, they measure DNA methylation and genes or gene expression as outcome or response variables(two differnet types of response variables). My boss might want to find out net effect of drug B, but I think we can not exclude the confounding effect of drugA. For example, it is po...
2018 Mar 05
0
data analysis for partial two-by-two factorial design
> On Mar 5, 2018, at 8:52 AM, Ding, Yuan Chun <ycding at coh.org> wrote: > > Hi Bert, > > I am very sorry to bother you again. > > For the following question, as you suggested, I posted it in both Biostars website and stackexchange website, so far no reply. > > I really hope that you can do me a great favor to share your points about how to explain the
2007 Jul 05
3
summarizing dataframe at variable/factor levels
All, Is there an efficient way to apply say "mean" or "median" to a dataframe according to say all combinations of two variables in the dataframe? Below is a simple example and the outline of a "manual" solution that will work but is not very efficient (could also generalize this to a function). Searched the archives and docs but didn't see anything close to
2002 Apr 18
1
Help with lme basics
In Baron and Li's "Notes on the use of R for psychology experiments and questionnaires" http://cran.r-project.org/doc/contrib/rpsych.htm they describe a balanced data set for a drug experiment: "... a test of drug treatment effect by one between-subject factor: group (two groups of 8 subjects each) and two within-subject factors: drug (2 levels) and dose (3 levels). "
2018 Mar 02
0
data analysis for partial two-by-two factorial design
This list provides help on R programming (see the posting guide linked below for details on what is/is not considered on topic), and generally avoids discussion of purely statistical issues, which is what your query appears to be. The simple answer is yes, you can fit the model as described, but you clearly need the off topic discussion as to what it does or does not mean. For that, you might try
2012 Mar 22
4
Plotting patient drug timelines using ggplot2 (or some other means) -- Help!!!
...Trouble is I need to figure out how to do this today. So not much time for me to struggle with it. Hoping someone can just help me out a bit. Below are some sample data and code that produces what I think is the beginning of a very nice graph. Need to alter the code to: 1. Get the lines for the drugs to appear on the y-axis in the order that they appear in the data. 2. Decrease the vertical space between the line segments for each drug so they are fairly close to one another. 3. Remove the numbering from the x-axis. 4. Put the text for pattern above the graph (e.g., "Begin (A), Begin (B...
2018 Mar 05
2
data analysis for partial two-by-two factorial design
...tions), > the effects of drugA and drugB can be determined via the model you rejected: > > >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug > B, omitting the fourth group of no drugA/yes drugB. > > > > > For example, if baseline control (no drugs) has a response of 0, drugA > has an effect of 1, drugB has an effect of 2, and the effects are additive, > with no noise we would have: > > > > > d <- data.frame(drugA = c("n","y","y"),drugB = c("n","n","y")) >...
2012 Mar 30
3
Adding text for written comments to bottom of graphs
Hello All, Recently developed the code below for graphing patterns of chemotherapy administration. As someone just starting to use R in their work, I managed to figure out some parts of the code but needed help with others. setwd("N:/Regimen Coding/0906/Plots Test") getwd() TestData <- structure(list(profile_key = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3), line = c(1, 1,
2006 Oct 05
2
treatment effect at specific time point within mixedeffects model
Hi David: In looking at your original post it is a bit difficult to ascertain exactly what your null hypothesis was. That is, you want to assess whether there is a treatment effect at time 3, but compared to what. I think your second post clears this up. You should refer to pages 224- 225 of Pinhiero and Bates for your answer. This shows how to specify contrasts. > -----Original Message-----
2018 Mar 05
0
data analysis for partial two-by-two factorial design
...assuming additivity (no interactions), the effects of drugA and drugB can be determined via the model you rejected: >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. > > For example, if baseline control (no drugs) has a response of 0, drugA has an effect of 1, drugB has an effect of 2, and the effects are additive, with no noise we would have: > > > d <- data.frame(drugA = c("n","y","y"),drugB = c("n","n","y")) d2 <- data.frame(trt...
2018 Mar 05
0
data analysis for partial two-by-two factorial design
...interactions), the effects of drugA and drugB can be determined via the model you rejected: > > >> three groups, no drugA/no drugB, yes drugA/no drugB, yes drugA/yes drug B, omitting the fourth group of no drugA/yes drugB. > > > > > For example, if baseline control (no drugs) has a response of 0, drugA has an effect of 1, drugB has an effect of 2, and the effects are additive, with no noise we would have: > > > > > d <- data.frame(drugA = c("n","y","y"),drugB = c("n","n","y")) > > d2 &...