similar to: Looking for easy way to normalize data by groups

Displaying 20 results from an estimated 1000 matches similar to: "Looking for easy way to normalize data by groups"

2008 Apr 03
1
Design package lrm summary and factors
Hello, I have question regarding the lrm function and estimating the odds ratio between different levels of a factored variable. The following code example illustrates the problem I am having. I have a data set with an outcome variable (0,1) and an input variable (A,B,C). I would like to estimate the effect of C vs B, but when I perform the summary I only get A vs B and A vs C, even though I
2009 Feb 17
4
joining "one-to-many"
Hello list, I am wondering if a joining "one-to-many" can be done a little bit easier. I tried merge function but I was not able to do it, so I end up using for and if. Suppose you have a table with locations, each location repeated several times, and some attributes at that location. The second table has the same locations, but only once with a different set of attributes. I would
2006 Apr 25
4
Help needed
Hi, I am trying to change a SAS macro to R. here is my code. I get an error at the last line. attach(fram) dset1<-cbind(AGE,BMI,DEATH) > BMIGRP<-cut(BMI,breaks=3,right=TRUE) > AGEGRP<-floor(AGE/10)-2 > dset<-cbind(AGEGRP,BMIGRP,DEATH) > maxage<-max(dset[,1]) > minage<-min(dset[,1]) > #maxcls<-dset[,2] > #mincls<-dset[,2] >
2008 Feb 05
1
Extracting level-1 variance from lmer()
All, How does one extract the level-1 variance from a model fit via lmer()? In the code below the level-2 variance component may be obtained via subscripting, but what about the level-1 variance, viz., the 3.215072 term? (actually this term squared) Didn't see anything in the archives on this. Cheers, David > fm <- lmer( dv ~ time.num*drug + (1 | Patient.new), data=dat.new )
2008 Sep 11
1
plot of all.effects object
All, I'm trying to plot an all.effects() object, as shown in the help for all.effects and also Crawley's R book (p.178, 2007). The data has a repeated measures structure, but I'm using all.effects for the simple lm() fit here. Below is a reproducible example that yields the error message. fm.ex = lm(dv ~ time.num*drug*X, data = dat.new) fm.effects = all.effects(fm.ex, xlevels =
2007 Dec 06
3
Setting Multiple Values via func_odbc ...?
I need to insert/update multiple MySQL columns in a single row with the func_odbc function at the SAME TIME. Someone showed me how to use ARRAY to retrieve multiple values at the same time, but I need to SET multiple values. Can this be done? If not, I will just stick with MySQL, but that's a pain in the ass because the asterisk-addons package has no default rpm spec file for building an
2005 Feb 07
1
Incorrect behavior for ordering timepoints in "reshape" (PR#7669)
Full_Name: Dav Clark Version: 2.0.1 OS: OS X 10.3 Submission from: (NULL) (128.122.87.35) When the timepoints that reshape uses (in direction="long") are negative or fractional, the time label is assigned incorrectly. It is easier to give an example than to describe the problem abstractly: Assume you have a data.frame header with values related to peri-stimulus time like this:
2011 Mar 10
1
How to use conditional statement
Dear R helpers Suppose val1 = c(10, 20, 35, 80, 12) val2 = c(3, 8, 11, 7) I want to select either val1 or val2 depending on value of third quantity val3. val3 assumes either of the values "Monthly" or "Yearly". If val3 = "Monthly", then val = val1 and if val3 = "Yearly", then val = val2. I tried the ifelse statement as ifelse(val3 =
2008 May 28
1
heatmap-changing column or row names
Dear R Community, I am trying to create an heatmap for the following set of data: ##example of data matrix o4 V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 green 27 28 29 29 28 28 26 25 25 23 23 22 22 21 21 22 22 22 yellow 6 8 8 7 7 7 6 6 6 7 7 7 6 6 6 6 6 5 red 15 15 15 15 15 15 14 13 12 11 12 10 9 8 7 6 8 9 pink
2018 Aug 06
2
Lowering ISD::TRUNCATE
I'm working on defining the instructions and implementing the lowering code for a Z80 backend. For now, the backend supports only the native CPU-supported datatypes, which are 8 and 16 bits wide (i.e. no 32 bit long, float, ... yet). So far, a lot of the simple stuff like immediate loads and return values is very straightforward, but now I got stuck with ISD::TRUNCATE, as in:
2008 Apr 28
2
F values from a Repeated Measures aov
Hi Folks, I have repeated measures for data on association time (under 2 acoustic condtions) in male and female frogs as they grow to adulthood (6 timepoints). Thus, two within-subject variables (Acoustic Condition: 2 levels, Timepoint: 6 levels) and one between-subject variable (Sex:male or female). I am pretty sure my distributions depart from normality but I would first like to simply run a
2010 Apr 11
2
simple question about contrasts, lm and factors
I have a data frame with two variables that are factors. One is actually a TRUE/FALSE factor, and I have coded it as 1/0, a continuous variable, but I could turn it back into a factor. The second is an ordered factor and consists of five timepoints. There are several continuous variables as well. Now I want to fit a linear model to my data, using lm (or another R procedure if recommended).
2010 May 26
2
extracat , JGR, iWidgets install problems
[Environment: Win XP, R 2.10.1] I'm trying to install the packages JGR and iWidgets required by the extracat package to make the interactive plots in the package work. I've tried various things, but nothing seems to work. Here is my most recent attempt, followed by my sessionInfo(). Does anyone have any suggestions how to make this work? > > library(extracat) Loading
2009 Oct 25
3
Importing data from text file with mixed format
Hi, I'm having difficulty importing my textfile that looks something like this: #begin text file Timepoint 1 ObjectNumber Volume SurfaceArea 1 5.3 9.7 2 4.9 8.3 3 5.0 9.1 4 3.5 7.8 Timepoint 2 ObjectNumber Volume SurfaceArea 1 5.1
2009 Mar 03
2
preparing data for barplot()
What is the best way to produce a barplot from my data? I would like the barplot to show each person with the values stacked val1+val2+val3, so there is one bar for each person When I use barplot(data.matrix(realdata)), it shows one bar for each value instead. To post here, I created an artificical data set, but it works fine. fakedata <- as.data.frame(list(LETTERS[1:3])) colnames(fakedata)
2012 Nov 23
2
Barplot with lines
Hi, I'm trying to plot stacked barplot with lines on it. Here is the data. emp days val1 val2 score 1 21 1 0 1200 2 35 1 1 na 3 42 na na 3000 4 53 2 1 2100 5 64 1 0 na 6 73 na na 1400 My X-axis is days. I'm looking to plot val1,val2 as stacked bars and score as lines with different y-axis. I could get the bar plot and lines on it but the problem is the bars and lines are not aligning
2009 Jan 06
1
[LLVMdev] Look-ahead instruction selection
Maybe I didn't describe the question very well. I want to match these patterns: (and (mul node:$val0, node:$val1)) (and (add node:$val0, node:$val1)) (and (sub node:$val0, node:$val1)) (and (udiv node:$val0, node:$val1)) into "four" different machines instructions, respectively: MUL_AND ADD_AND SUB_AND UDIV_AND That is, this machine is capable of doing an
2011 Feb 03
2
R-help
Hi, I have data like this.... print(x) ID VAL1 VAL2 1 B A 2 P Q 3 T S What I would like is data like this... ID VAL1 VAL2 1 A B 2 P Q 3 S T So that VAL1 and VAL2 are alphabetically ordered. Any advice is welcome! San. [[alternative HTML version deleted]]
2010 Sep 16
1
ANOVA - more sophisticated contrasts
dear list, i am using a multifactorial design with two treatments (factor A: drugs, three levels; factor B: theraphy, two levels) and a time factor (three levels, different timepoint). hypothetically, i measured the same subjects for all treatements and timepoints, so its a repeated measurement design. now i ran an anova in R and also some Tukey post-hoc tests using glht. but what i am actually
2009 Nov 13
1
R and HDF5 Question
Hello All, I just signed up to this list, so I apologize if this question has been asked before. I am trying to load an hdf5 file into R and running into some problems. Here are the steps I took to configure my environment: * R 2.10.0 (x64) on Mac OS X 10.6 * hdf5 1.8.3 installed via macports * hdf5_1.6.9.tar.gz from CRAN I suspect the problem I am having relates to