similar to: Frequency and summary statistics table with different variables and categories

Displaying 20 results from an estimated 7000 matches similar to: "Frequency and summary statistics table with different variables and categories"

2006 Sep 20
1
Stats question - cox proportional hazards adjustments
Hi useRs, Many studies of the link between red meat and colorectal cancer use Cox proportional hazards with (among other things) a gender covariate. If it is true that men eat more red meat, drink more alcohol and smoke more than women, and if it is also true that alcohol and tobacco are known risk factors then why does it make sense to "adjust" for gender? I would think that in this
2012 Apr 11
0
mosaic 0.4 on CRAN
One of the products of Project MOSAIC (funded by an NSF CCLI grant) has been the development of an R package with the goal of making it easier to use R, especially in teaching situations. We're not quite ready to declare that we've reached version 1.0, but version 0.4 does represent a fairly large step in that direction. You can find out more about the package on CRAN or by installing
2012 Apr 11
0
mosaic 0.4 on CRAN
One of the products of Project MOSAIC (funded by an NSF CCLI grant) has been the development of an R package with the goal of making it easier to use R, especially in teaching situations. We're not quite ready to declare that we've reached version 1.0, but version 0.4 does represent a fairly large step in that direction. You can find out more about the package on CRAN or by installing
2009 Mar 29
2
re form data for aov()?
I have data in a file named hands.dat, which is given at the end of this question. (It's from a stats textbook example on anova). I'd like to do an aov on this, which I guess would be d <- read.table("~/hands.dat", header=TRUE) aov(Bacterial.Counts ~ Water + Soap + Antibacterial.Soap + Alcohol.Spray, data=d) but this fails. Do I need to break d$Method up into columns for
2001 Mar 01
1
[OT] correspondence analysis w/ non-mutually-exclusive categories
Greetings, again. This is not strictly an R question, so please feel free to ignore it if you like. My question is about the substance of correspondence analysis. Specifically, is it appropriate to use ca on a matrix of values such that the columns and/or rows are not mutually exclusive? To be more detailed: - The standard use of ca is illustrated in the example of corresp() (from MASS):
2005 Apr 23
1
question about about the drop1
the data is : >table.8.3<-data.frame(expand.grid( marijuana=factor(c("Yes","No"),levels=c("No","Yes")), cigarette=factor(c("Yes","No"),levels=c("No","Yes")), alcohol=factor(c("Yes","No"),levels=c("No","Yes"))), count=c(911,538,44,456,3,43,2,279))
2012 Jan 24
2
sampling weights in package lme4
Dear All I am trying to include sampling weights in multilavel regression analysis using packege lme4 using following codes print(fm1 &lt;- lmer(DC~sex+age+smoker+alcohol+fruits(1|setting), dataset,REML = FALSE), corr = FALSE) print(fm2 &lt;- lmer(DC~sex+age+smoker+alcohol+fruits(1|setting), dataset,REML = FALSE), corr = FALSE,weights=sweight) The problem is both the
2011 Apr 19
2
Several factors same levels
This is probably very simple but I'm new to R so apologies for being stupid. I have some data with No coded as 0 and yes coded as 1. e.g. id sex alcohol smoker 1 M 0 1 2 F 1 0 3 M 0 0 I realise I can covert the numerical variable back to a factor by falcohol<-factor(alcohol,levels=0:1) levels<-c("No","Yes")
2005 May 26
5
a more elegant approach to getting the majority level
Hi, I have a factor and I would like to find the most frequent level. I think my current approach is a bit long winded and I was wondering if there was a more elegant way to do it: x <- factor(sample(1:0, 5,replace=TRUE)) levels(x)[ which( as.logical((table(x) == max(table(x)))) == TRUE ) ] (The length of x will always be an odd number, so I wont get a tie in max()) Thanks,
2010 Mar 26
4
Creating a vector of categories
Hi, I have a column in a data frame looking something like: $sex $language $count male english 0 male english 0 female english 32 male spanish 154 female english 11 female norweigan 7 and so on. What I want to do is to order these in to categories, for instance one category where count>=0 & count<10 and so on.. I want my data to turn out looking something like: male
2011 May 05
4
Using functions/loops for repetitive commands
I still need to do some repetitive statistical analysis on some outcomes from a dataset. Take the following as an example; id sex hiv age famsize bmi resprate 1 M Pos 23 2 16 15 2 F Neg 24 5 18 14 3 F Pos 56 14 23 24 4 F Pos 67 3 33 31 5 M Neg 34 2 21 23 I want to know if there are statistically detectable differences in all of the continuous variables in
2013 Nov 17
1
FactoMineR
Hola. Como te dijo Carlos, el problema está en los nombres de las columnas y en los nombres de las filas. Cuando hice la importación (con dd<-read.csv('mortality.csv'), tuve problemas con las filas de nombre: - Malignant tumour of the larynx trachea bronchus and lungs - Malignant tumour of the lip pharynx and mouth - Other endocrinological metabolic and nutritional conditions
2008 Feb 09
1
bad variable names when printing a data frame containing a matrix (PR#10730)
library(glmpath) data(heart.data) # heart.data is a list, $y a vector, $x a matrix data <- data.frame(x=I(heart.data$x), y = heart.data$y) > data[1:2,] x.1 x.2 x.3 x.4 x.5 x.6 x.7 x.8 x.9 y 1 160 12 5.73 23.11 1 49 25.3 97.2 52 1 2 144 0.01 4.41 28.61 0 55 28.87 2.06 63 1 > dimnames(heart.data$x)[[2]] [1] "sbp"
2015 Aug 19
3
asterisk server stress test
Am 19.08.2015 um 19:07 schrieb Steve Edwards: > Please don't top post. > > On Wed, 19 Aug 2015, James Cass wrote: > >> Steve, would you be willing to share that "quick bash script"? > > There's no magic in the script, but here it is, embarrassing myself: > > cp sample-call-file /tmp/ > chmod +x /tmp/sample-call-file >
2006 Apr 17
6
acts_as_taggable confused
Ahoy, So i''ve installed the acts_as_taggable module and everything is fine, but i''m a bit confused about this bit of code described in the API "photo = Photo.new # splits and adds to the tags collection photo.tag "wine beer alcohol" # don''t need to split since it''s an array, but replaces the tags collection # trailing and leading
2012 Mar 22
4
Plotting patient drug timelines using ggplot2 (or some other means) -- Help!!!
Hello All, Want very much to learn how to plot patient drug timelines. 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
2013 Nov 19
1
Repeated measures with categorical data
Hello, I am working in a longitudinal study, with a categorical variable as a dependent variable (alcohol consumption: no use, use, abuse and dependence) with repeated measures (baseline, 1 year, 2 years). Besides I have another variable with two groups: control and experimental. I would like to analyze the evolution in each group, I have though in lme, but I am not sure if I can do an lme with
2023 Nov 04
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
I might have factored the gender. I'm not sure it would in any way be quicker. But might be to some extent easier to develop variations of. And is sort of what factors should be doing... # make dummy data gender <- c("Male", "Female", "Male", "Female") WC <- c(70,60,75,65) TG <- c(0.9, 1.1, 1.2, 1.0) myDf <- data.frame( gender, WC, TG ) #
2023 Nov 03
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
Just a minor point in the suggested solution: df$LAP <- with(df, ifelse(G=='male', (WC-65)*TG, (WC-58)*TG)) since WC and TG are not conditional, would this be a slight improvement? df$LAP <- with(df, TG*(WC - ifelse(G=='male', 65, 58))) -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Jorgen Harmse via R-help Sent: Friday,
2013 May 18
1
[LLVMdev] Cambridge LLVM Social + Beer Festival
Dear folks, Next week will be the famous Cambridge Beer Festival, and since beer has everything to do with compilers, we'll hold the the next LLVM Social there, trying to find the blood alcohol concentration of 0.1337% to achieve super-human programming abilities. http://www.cambridgebeerfestival.com/viewnode.php?id=3 Some of use will be there all week, or so I heard, but most of us will be