[R] question related to multiple regression

2010-10-08 Thread SNN
Hi, I am conducting an association analysis of genotype and a phenotype such as cholesterol level as an outcome and the genotype as a regressor using multiple linear regression. There are 3 possibilities for the genotype AA, AG, GG. There are 5 people with the AA genotype, 100 with the AG

[R] power?

2009-10-07 Thread SNN
Hi, I have used multiple linear regression on a data set and one if the regressor was significant with a p-value =0.01 I need to calculate the power for a multiple linear regression. i.e. do I have enough power to believe the above p-value? -- View this message in context:

[R] Power for Multiple regression?

2009-10-07 Thread SNN
Hi All, I came across this problem which is more a statistical question, I am hoping that some one can clarify this for me Is there a rule of thumb to determine how large your sample size should be before you perform multiple regression. I have search the web and I found some online tools where

Re: [R] power?

2009-10-07 Thread SNN
bother with your power analysis, unless you are planning a new experiment. Simon. On Tue, 2009-10-06 at 13:49 -0700, SNN wrote: Hi, I have used multiple linear regression on a data set and one if the regressor was significant with a p-value =0.01 I need to calculate the power

[R] logistic regression

2009-08-12 Thread SNN
Hi All, I have data with 400 individuals and the following information Grade: pass or fail Sex: male or female Age Teaching.metho : can be 1,2,3 TotalHours: can be 0,1,2 I want to fit a logistic regression and for the TotalHours I am getting nothing! What could be the reason. What does

[R] what is the difference between the two logistic models?

2009-08-12 Thread SNN
Hi All, I have data with 400 individuals and the following information Grade: pass or fail coded as 1 for pass and 0 for fail Sex: male or female ( coded as 1 for male and 2 for female ) Age Teaching.method : can be 1,2,3 I want to fit a logistic regression where the outcome if

[R] Chi-squared approximation may be incorrect

2009-08-11 Thread SNN
Hi, I am trying to run a Chi squre test but I am getting the following message Warning messages: 1: In chisq.test(t) : Chi-squared approximation may be incorrect Does anyone what it means? your help is appreciated -- View this message in context:

[R] Problem with modifying a data frame

2009-08-11 Thread SNN
Hi All, this could be a simple question but I am looking into modifying a data frame using a condition without the need to loop over that data, would that be possible? I have tried the following x-c(4,5,6,6,8) y-c(a,b,b,b,c) data-data.frame(x,y) data x y 1 4 a 2 5 b 3 6 b 4 6 b 5 8 c

[R] should I use rbind in my example?

2009-01-21 Thread SNN
Hi, I need to rbind two data frames. Each one has a header . after the rbind I would like to keep the header for each and have the two data frames separated by a line. Is this possible to do in R? For example weight_meanweight_sd.dev F 14.3 4.932883 M 34.7 10.692677

Re: [R] should I use rbind in my example?

2009-01-21 Thread SNN
your own specialized print routine. On Wed, Jan 21, 2009 at 10:30 AM, SNN s.nan...@yahoo.com wrote: Hi, I need to rbind two data frames. Each one has a header . after the rbind I would like to keep the header for each and have the two data frames separated by a line. Is this possible to do

[R] problem with rbind

2009-01-20 Thread SNN
Hi All, I have a problem with rbind. I have data that consist of weight height .. etc of 1000 patients. I would like to find the mean and the standard deviation ( for the weight , height etc) for each gender. data-read.table(data.txt, header=T, sep='\t') fdata=NULL for (i in 1:50){

Re: [R] colored 3d scatter plot

2008-03-06 Thread SNN
Thank you all for your help. SNN wrote: Hi All, I have data for two groups, group with 100 points and group B with 15 points. i needed plot these two groups in one scatter plot, each group with a different color. I tried plot3d(data, col = c(red, blue)[c(rep(1, 100), rep(2, 15

[R] colored 3d scatter plot

2008-03-04 Thread SNN
Hi All, I have data for two groups, group with 100 points and group B with 15 points. i needed plot these two groups in one scatter plot, each group with a different color. I tried plot3d(data, col = c(red, blue)[c(rep(1, 100), rep(2, 15))], pch=20) . this works but the graph does not look

Re: [R] colored 3d scatter plot

2008-03-04 Thread SNN
I tried scatterplot3d(data, color = rep(c(red, blue), c(100, 15)), pch=16) and I am getting the following error message, Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid color name Does anyone know what he problem is? -- View this message in context:

Re: [R] Plot Principal component analysis

2008-02-28 Thread SNN
, pch=16) where the graph looks much nicer but i do not know how to have each group with a different color. Does anyone know how to do it? SNN wrote: Hi, I have matrix of 300,000*115 (snps*individual). I ran the PCA on the covariance matrix which has a dimention oof 115*115. I have the first

Re: [R] Plot Principal component analysis

2008-02-27 Thread SNN
Thanks for your help, Can R plot the data in 3 dimention, with different colors for each group ? for exmple I would like to have the plot with respect to PC1, PC2 and PC3. Thanks, SNN wrote: Hi, I have matrix of 300,000*115 (snps*individual). I ran the PCA on the covariance matrix

Re: [R] Principal component analysis PCA

2008-02-14 Thread SNN
in memory, you need some sort of double loop. -thomas Zhaoming -Original Message- From: SNN [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 9:14 PM To: r-help@r-project.org Subject: [R] Principal component analysis PCA Hi, I am trying to run PCA on a set

[R] Principal component analysis PCA

2008-02-13 Thread SNN
Hi, I am trying to run PCA on a set of data with dimension 115*300,000. The columns represnt the snps and the row represent the individuals. so this is what i did. #load the data code-read.table(code.txt, sep='\t', header=F, nrows=30) # do PCA # pr-prcomp(code, retx=T, center=T) I am