Re: [R] creating standard curves for ELISA analysis

2008-12-25 Thread 1Rnwb
   18  15  
122 14  4   2   7   1581496 18  35  20  
94
C4  11  270 6   23  20.519.59   14.568  
656 15  3   4   79  5995296450  40.517  
198.5
D4  12  207 4   27  21  19  10  14  11  
39  16  5   3   6.5 1622.5  311 25  25  15  
181
E4  13  367 7.5 25  21  19  12  10  13  
50  12  7   1   8.5 1395.5  718.5   24  30  19  
219
F4  14  462 5   23  20  19  7.5 14  10  
107 14  4   0   10  1715.5  484.5   23  22  19  
265
G4  15  441.5   5   19  20  18  7   16  29  
271 12  5   1   10  6917632524.532  15.5
156
H4  16  521 7   38  22  18  10  14  11  
164 16  4   3   23  1967744 25  34.515  
202
A5  17  759 5   18  21  16.510  10  10  
55  11  4   1.5 16  1731.5  752 19  30  12  
288
B5  18  624 6   22.520  21  12.511  12  
52  12.54   2   8   2329.5  533 23  30.515  
125
C5  19  735 5   21  19  14  10  17  11.5
291.5   9   5   3   10  773 1682.5  26  33  17.5
67
D5  20  450 5   25  16  15.58   17  12  
65  12  5   3.5 9   1970335 20  23  14  
110
E5  21  405 5   21  18  14  7   12  10  
139 13.55   0   8.5 1318433 25.533.514  
89
F5  22  155 3.5 12.510  12  4   35  6   
24  4.5 3   2   8.5 391 257 19  114.5   8   
104
G5  23  472 6   23  17  18  6   12  38.5
348 11  3   2   7   2764161239  967 20  
197
H5  24  326 5.5 20  19  17  7.5 13.511  
44  13  5   3   66  1579272.5   24  24  13  
152.5
A6  25  341 5   24  22  15  8   13.513  
68.512  4   2   7   1591483 22  34  11  
84
B6  26  460.5   5   21  23  16  10  11  160 
677.5   11  5   2   23  5326149546.562  19  
138
C6  27  454 4   32.516.515  9   10.514  
104.5   10.53   1   50  1468145925.538  17
142
D6  28  604 6   27  18  16.57   14.537  
950.5   12.55   4   14  5643598024  36  18  
324.5
E6  29  491 7   22.518  19  8   13.523  
240 17  4   1   11  3802.5  190230.547.520  
297
F6  30  414 4   24.520  20.59   13  14  
39  16  3   3   6   1384.5  585.5   23  32  13  
95
G6  31  423 5.5 21  19.519  9   16  299 
142815  5   2   49  63436018160.5   335 11.5
211
H6  32  286 6   28  18  10  9   14  13  
108 13.53   2   27.51369808 20  32  237 
70
A7  33  874.5   6   23.520  16  8   12.565  
588 6   5.5 3   17  5915509836  81  23  
229
B7  34  12113   23  20  16  33  12  9.5 
78  9   4.5 2   8   2097693.5   16.528  13  
274.5
C7  35  257 4.5 25.517  16.59   12  10  
52  10  5   3   7   1456750 24  23  11  
70.5


Thanks for the help

1Rnwb wrote:
> 
> Hello R guru's
> 
> I am a newbie to R, In my research work I usually generate a lot of ELISA
> data in form of absorbance values. I ususally use Excel to calculate the
> concentrations of unknown, but it is too tedious and manual especially
> when I have 100's of files to process. I would appreciate some help  in
> creating a R script to do this with minimal manual input. s A1-G1 and
> A2-G2 are standards serially diluted H1 and H2 are Blanks. A3 to H12 are
> serum samples. I am pasting the structure of my data below:
> 
> 
> 
> A114821
> B111577
> C15781
> D12580
> E19

[R] creating standard curves for ELISA analysis

2008-12-09 Thread 1Rnwb

Hello R guru's

I am a newbie to R, In my research work I usually generate a lot of ELISA
data in form of absorbance values. I ususally use Excel to calculate the
concentrations of unknown, but it is too tedious and manual especially when
I have 100's of files to process. I would appreciate some help  in creating
a R script to do this with minimal manual input. s A1-G1 and A2-G2 are
standards serially diluted H1 and H2 are Blanks. A3 to H12 are serum
samples. I am pasting the structure of my data below:



A1  14821
B1  11577
C1  5781
D1  2580
E1  902
F1  264
G1  98
H1  4
A2  14569.5
B2  11060
C2  5612
D2  2535
E2  872
F2  285
G2  85
H2  3
A3  1016
B3  2951.5
C3  547
D3  1145
E3  4393
F3  4694
G3  1126
H3  1278
A4  974.5
B4  3112.5
C4  696.5
D4  2664.5
E4  184.5
F4  1908
G4  108.5
H4  1511
A5  463.5
B5  1365
C5  816
D5  806
E5  1341
F5  1157
G5  542.5
H5  749

-- 
View this message in context: 
http://www.nabble.com/creating-standard-curves-for-ELISA-analysis-tp20917182p20917182.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ttest in R

2009-03-07 Thread 1Rnwb

Dear list, 

i am a biologist who needs to do some ttest between disease and non disease,
sex, genotype and the serum levels of proteins on a large number of
individuals. i have been using excel for a long time but it is very tedious
and time consuming. i am posting the data below and ask your help in
generating a code to get this analysis done in R. thanks

gender  disease genotypedata
M   N   CC  3.206447188
F   N   CC  8.2
M   N   CC  15.78908629
M   N   CC  21.14311843
F   N   CC  21.48413647
M   N   CC  30.08028842
M   N   CC  30.11455009
F   N   CC  32.41258845
F   N   CT  6622.253065
M   N   CT  6763.6
M   N   CT  7342.023209
F   N   CT  7617.7
F   N   CT  7857.3
M   N   CT  8027.78692
F   N   CT  8755.950438
M   N   CT  9007.7
F   N   CT  9157.76987
M   N   CT  9398.270953
F   N   CT  9710.083037
F   N   CT  9896.887277
M   N   CT  10082.60082
F   N   CT  10137.05244
F   N   CT  10350.76186
M   N   CT  14629.34508
F   N   TT  4.614829254
F   N   TT  5.223593964
F   N   TT  6.7
M   N   TT  6.7
M   N   TT  7.735287229
F   N   TT  13.68084134
F   N   TT  14.5
M   N   TT  15.3
M   N   TT  16.16826703
M   N   TT  19.8
M   N   TT  24.51271254
M   N   TT  29.92459383
F   N   TT  30.3993842
M   N   TT  30.57161207
F   N   TT  30.72031553
F   N   TT  31.8
F   N   TT  34.72409961
M   N   TT  37
F   N   TT  38.94507607
M   N   TT  39.1
M   N   TT  40.9
M   N   TT  41.5
F   N   TT  42.36614019
F   Y   CC  338.2166757
M   Y   CC  345.8711007
M   Y   CC  347.4659528
F   Y   CC  356.3
F   Y   CC  358.4
F   Y   CC  360.184259
F   Y   CC  453.8
F   Y   CC  573.7342373
M   Y   CC  962.1232959
F   Y   CC  1055.9
F   Y   CC  1309.532621
F   Y   CC  2798.6
F   Y   CC  3568.794326
M   Y   CT  1.227348206
F   Y   CT  2.061944986
F   Y   CT  2.245592643
M   Y   CT  2.454696412
M   Y   CT  2.456716738
M   Y   CT  4.318447391
M   Y   CT  4.503098245
M   Y   CT  5.873088452
M   Y   CT  7.106930564
F   Y   CT  7.7
M   Y   CT  10.83537709
M   Y   CT  11.4
M   Y   CT  12.1
M   Y   CT  12.62002743
M   Y   CT  13.6
F   Y   CT  13.7
F   Y   CT  14.35562171
F   Y   CT  15.9
F   Y   TT  986.6755719
F   Y   TT  1206.475083
F   Y   TT  1237.9
M   Y   TT  1254.5
F   Y   TT  1303.6
F   Y   TT  1573.915019
M   Y   TT  1756.8
M   Y   TT  1895
M   Y   TT  2126.766565
F   Y   TT  2149.512866
M   Y   TT  3249.449945
F   Y   TT  6999.3
M   Y   TT  7172.479241
M   Y   TT  8268.909251
M   Y   TT  8544.229671

-- 
View this message in context: 
http://www.nabble.com/ttest-in-R-tp22390889p22390889.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] ttest in R

2009-03-08 Thread 1Rnwb

Thanks for the help, but ANOVA will give me a single pvalue, then how i can
make sure which group is showing the significant differences.

Tal Galili wrote:
> 
> Hello friend.
> 
> I believe anova might be a better solution for you.
> You might have a look here:
> http://www.personality-project.org/r/r.anova.html
> 
> A simple R session that will work for you is:
> 
> # getting the data in:
> data1 <- read.table( "enter the path of the file here, look at 
> ?read.table
> for exact syntax)
> 
> aov1 <- aov(data ~ gender +  disease + genotype   ,data = data1)
> summary(aov1)
> 
> 
> If you insist on t.test, here is the way:
> t.test(data ~ gender   ,data = data1)
> t.test(data ~ disease   ,data = data1)
> t.test(data ~ genotype   ,data = data1)
> 
> 
> Cheers,
> Tal
> 
> 
> 
> 
> On Sat, Mar 7, 2009 at 9:23 PM, 1Rnwb  wrote:
> 
>>
>> Dear list,
>>
>> i am a biologist who needs to do some ttest between disease and non
>> disease,
>> sex, genotype and the serum levels of proteins on a large number of
>> individuals. i have been using excel for a long time but it is very
>> tedious
>> and time consuming. i am posting the data below and ask your help in
>> generating a code to get this analysis done in R. thanks
>>
>> gender  disease genotypedata
>> M   N   CC  3.206447188
>> F   N   CC  8.2
>> M   N   CC  15.78908629
>> M   N   CC  21.14311843
>> F   N   CC  21.48413647
>> M   N   CC  30.08028842
>> M   N   CC  30.11455009
>> F   N   CC  32.41258845
>> F   N   CT  6622.253065
>> M   N   CT  6763.6
>> M   N   CT  7342.023209
>> F   N   CT  7617.7
>> F   N   CT  7857.3
>> M   N   CT  8027.78692
>> F   N   CT  8755.950438
>> M   N   CT  9007.7
>> F   N   CT  9157.76987
>> M   N   CT  9398.270953
>> F   N   CT  9710.083037
>> F   N   CT  9896.887277
>> M   N   CT  10082.60082
>> F   N   CT  10137.05244
>> F   N   CT  10350.76186
>> M   N   CT  14629.34508
>> F   N   TT  4.614829254
>> F   N   TT  5.223593964
>> F   N   TT  6.7
>> M   N   TT  6.7
>> M   N   TT  7.735287229
>> F   N   TT  13.68084134
>> F   N   TT  14.5
>> M   N   TT  15.3
>> M   N   TT  16.16826703
>> M   N   TT  19.8
>> M   N   TT  24.51271254
>> M   N   TT  29.92459383
>> F   N   TT  30.3993842
>> M   N   TT  30.57161207
>> F   N   TT  30.72031553
>> F   N   TT  31.8
>> F   N   TT  34.72409961
>> M   N   TT  37
>> F   N   TT  38.94507607
>> M   N   TT  39.1
>> M   N   TT  40.9
>> M   N   TT  41.5
>> F   N   TT  42.36614019
>> F   Y   CC  338.2166757
>> M   Y   CC  345.8711007
>> M   Y   CC  347.4659528
>> F   Y   CC  356.3
>> F   Y   CC  358.4
>> F   Y   CC  360.184259
>> F   Y   CC  453.8
>> F   Y   CC  573.7342373
>> M   Y   CC  962.1232959
>> F   Y   CC  1055.9
>> F   Y   CC  1309.532621
>> F   Y   CC  2798.6
>> F   Y   CC  3568.794326
>> M   Y   CT  1.227348206
>> F   Y   CT  2.061944986
>> F   Y   CT  2.245592643
>> M   Y   CT  2.454696412
>> M   Y   CT  2.456716738
>> M   Y   CT  4.318447391
>> M   Y   CT  4.503098245
>> M   Y   CT  5.873088452
>> M   Y   CT  7.106930564
>> F   Y   CT  7.7
>> M   Y   CT  10.83537709
>> M   Y   CT  11.4
>> M   Y   CT  12.1
>> M   Y   CT  12.62002743
>> M   Y   CT  13.6
>> F   Y   CT  13.7
>> F   Y   CT  14.35562171
>> F   Y   CT  15.9
>> F   Y   TT  986.6755719
>> F   Y   TT  1206.475083
>> F   Y   TT  1237.9
>> M   Y   TT  1254.5
>> F   Y   TT  

Re: [R] ttest in R

2009-03-08 Thread 1Rnwb

since the estimation is not done pairwise so i cannot use pairwise.t.test,
how do i apply tukeyHSD

Thomas Petzoldt-4 wrote:
> 
> 1Rnwb schrieb:
>> Thanks for the help, but ANOVA will give me a single pvalue, then how i
>> can
>> make sure which group is showing the significant differences.
> 
> Hi,
> 
> ANOVA is fine and please have a look on ?TukeyHSD and don't forget to 
> consult your statistics textbook about post-hoc testing. If you insist 
> in using t.test, don't forget Bonferroni or Holm-correction (in R: 
> ?p.adjust) or use ?pairwise.t.test !!!
> 
> ThPe
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ttest-in-R-tp22390889p22401372.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to do adjust for sex, age, genotype for a data

2009-07-17 Thread 1Rnwb

Hello R gurus,

I am biologist doing biomarker research and I have a data set where I have 6
proteins and close to 3000 samples, i have to look for differences between
disease(Y) and controls(N) along with genetic risk, genotypes, sex and other
demographic info available. however i do not know any of the statistics to
do the adjustment for sex, age, genotype, genetic risk. I have been reading
in papers where the authors are talking about adjusting for age, sex,
genotype, genetic risk. The CDC website suggests for adjusting the age using
the weights, but I am not sure as this would apply to my data. one website
says that if the distribution is not equal then one has to model sex, age
and other demographic parameters as co-variates. I would appreciate if
someone can help me to understand this more clearly and provide directions
on modeling these to do my analysis. I am attaching a sample data file with
this post. Thanks
http://www.nabble.com/file/p24534963/Sample%2Bdata.csv Sample+data.csv 
-- 
View this message in context: 
http://www.nabble.com/How-to-do-adjust-for-sex%2C-age%2C-genotype-for-a-data-tp24534963p24534963.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to do adjust for sex, age, genotype for a data

2009-07-17 Thread 1Rnwb

then what will be the other factors needed to be adjusted and whether I
should adjust or use them as covariates. Finally how these analysis will be
done in R


Harrell, Frank E wrote:
> 
> 1Rnwb wrote:
>> Hello R gurus,
>> 
>> I am biologist doing biomarker research and I have a data set where I
>> have 6
>> proteins and close to 3000 samples, i have to look for differences
>> between
>> disease(Y) and controls(N) along with genetic risk, genotypes, sex and
>> other
>> demographic info available. however i do not know any of the statistics
>> to
>> do the adjustment for sex, age, genotype, genetic risk. I have been
>> reading
>> in papers where the authors are talking about adjusting for age, sex,
>> genotype, genetic risk. The CDC website suggests for adjusting the age
>> using
>> the weights, but I am not sure as this would apply to my data. one
>> website
>> says that if the distribution is not equal then one has to model sex, age
>> and other demographic parameters as co-variates. I would appreciate if
>> someone can help me to understand this more clearly and provide
>> directions
>> on modeling these to do my analysis. I am attaching a sample data file
>> with
>> this post. Thanks
>> http://www.nabble.com/file/p24534963/Sample%2Bdata.csv Sample+data.csv 
> 
> If the only clinical variables you are adjusting for are age and sex 
> this analysis will be misleading at best.
> 
> Frank
> 
> -- 
> Frank E Harrell Jr   Professor and Chair   School of Medicine
>   Department of Biostatistics   Vanderbilt University
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-do-adjust-for-sex%2C-age%2C-genotype-for-a-data-tp24534963p24538093.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] dot plot with several points for 2 categories

2009-07-20 Thread 1Rnwb

I use  the long way, you might have to play around with my script to get is
correct. once you get it to work, you can add as many points to reflect,
median, percentile etc.

## generatiing vectors for Group1
a<-LMMP8[Self_T1D=="N"]
w <- a[!is.na(a)]
 length(w)

c<-mean(a, na.rm=TRUE)
c
n<-as.integer(length(w)/7)
n
n4<- length(w)-6*n
n4
###Generating vectors for T1D
b<-LMMP8[Self_T1D=="Y"]
x <- b[!is.na(b)]
 length(x)

d<-mean (b, na.rm=TRUE)
d
m<-as.integer(length(x)/7)
m
m4<- length(x)-6*m
m4

u<-append(w, x, after = length(w))
length(u)

x<-c(rep(1:6,n),rep(7,n4), rep(11:16,m),rep(17,m4))
length(x)
#Plotting the data
plot(x,u, ylab="Log MMP8",pch=19,cex.lab=1.5,lty=2,cex=1.1,
cex.axis=1.25,xaxt="n")
points(4,c,pch=25,col="red",lwd=5)
points(14,d,pch=25,col="red",lwd=5)





jaregi wrote:
> 
> I'm trying to wean myself off the very limited capabilities of Excel and
> Oo. Currently, I am trying to make a plot showing several values for 2
> categories in a dot blot (see 
> http://www.nabble.com/file/p24538360/Picture%2B1.png Picture+1.png  except
> that the x axis should contain the category not a number, which was the
> only way to coax Excel into displaying a plot like this). I started
> working through some tutorials but the example didn't quite fit what I was
> looking for. The closest was the car and mpg example but it 1 value per
> name whereas I need several value per category. Does anybody know this of
> the top of your expert heads? This would be a great help. I already burned
> a few hours without getting closer to the solution..
> 
> Best, j
> 

-- 
View this message in context: 
http://www.nabble.com/dot-plot-with-several-points-for-2-categories-tp24538360p24573397.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] heatmap plot

2009-07-20 Thread 1Rnwb

since heatmap is a graphic image it needs the "graphics" library. you can see
these two in the examples for heatmap.

require(graphics); require(grDevices)


Markus Mühlbacher wrote:
> 
> Dear R community!
> 
> I am trying to create a heatmap based on the following data. As you can
> see the diagonal (0,0 to 10,10) is always 0). If I run the heatmap command
> like i posted it I get a graph with horizontal lines. 
> 
> What is my mistake?
> 
>> heatmap(activity.matrix, Rowv = NA, Colv = NA, scale="column", xlab="x
>> Compounds", ylab="y Compounds", col=topo.colors(100))
>> activity.matrix
> [,1]   [,2]   [,3][,4]  [,5]   [,6]
>  [1,]  0.000 -0.1017802  0.3635007  0.62522118 0.8869417 -0.4652809
>  [2,]  0.1017802  0.000  0.4652809  0.72700138 0.9887219 -0.3635007
>  [3,] -0.3635007 -0.4652809  0.000  0.26172050 0.5234410 -0.8287816
>  [4,] -0.6252212 -0.7270014 -0.2617205  0. 0.2617205 -1.0905021
>  [5,] -0.8869417 -0.9887219 -0.5234410 -0.26172050 0.000 -1.356
>  [6,]  0.4652809  0.3635007  0.8287816  1.09050206 1.356  0.000
>  [7,] -0.2471805 -0.3489607  0.1163202  0.37804072 0.6397612 -0.7124613
>  [8,]  1.0032619  0.9014817  1.3667626  1.62848308 1.8902036  0.5379810
>  [9,] -0.6833813 -0.7851615 -0.3198806 -0.05816011 0.2035604 -1.1486622
> [10,]  1.0759620  0.9741818  1.4394627  1.70118322 1.9629037  0.6106812
> [,7][,8][,9]   [,10]
>  [1,]  0.2471805 -1.00326190  0.68338129 -1.07596204
>  [2,]  0.3489607 -0.90148171  0.78516149 -0.97418184
>  [3,] -0.1163202 -1.36676259  0.31988061 -1.43946272
>  [4,] -0.3780407 -1.62848308  0.05816011 -1.70118322
>  [5,] -0.6397612 -1.89020358 -0.20356039 -1.96290371
>  [6,]  0.7124613 -0.53798102  1.14866217 -0.61068116
>  [7,]  0.000 -1.25044237  0.43620083 -1.32314250
>  [8,]  1.2504424  0.  1.68664319 -0.07270014
>  [9,] -0.4362008 -1.68664319  0. -1.75934333
> [10,]  1.3231425  0.07270014  1.75934333  0.
> 
> Thanks in advance. 
> 
> Greets, 
> Markus
> 
> 
> 
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/heatmap-plot-tp24572168p24574102.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re gression using age and Duration of disease as a continous factors

2009-07-20 Thread 1Rnwb

Please explain me as what it means and how this analysis can be done using R
and which library(ies) are needed.
Thanks

-- 
View this message in context: 
http://www.nabble.com/Regression-using-age-and-Duration-of-disease-as-a-continous-factors-tp24574133p24574133.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-20 Thread 1Rnwb

I have read that multiple times without understanding anything. 

Greg Snow-2 wrote:
> 
> If you need an explanation of what regression means, then you need to take
> a course or 2 at your local university, or at least hire a statistical
> consultant.
> 
> If you understand regression and just need the explanation of how to do it
> using R, then read section 11 (as well as everything else) of "An
> Introduction to R".
> 
> -- 
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
> 
> 
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
>> project.org] On Behalf Of 1Rnwb
>> Sent: Monday, July 20, 2009 11:30 AM
>> To: r-help@r-project.org
>> Subject: [R] Re gression using age and Duration of disease as a
>> continous factors
>> 
>> 
>> Please explain me as what it means and how this analysis can be done
>> using R
>> and which library(ies) are needed.
>> Thanks
>> 
>> --
>> View this message in context: http://www.nabble.com/Regression-using-
>> age-and-Duration-of-disease-as-a-continous-factors-
>> tp24574133p24574133.html
>> Sent from the R help mailing list archive at Nabble.com.
>> 
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-
>> guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Regression-using-age-and-Duration-of-disease-as-a-continous-factors-tp24574133p24577937.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-20 Thread 1Rnwb

I thought this forum is for help. now i know what the statistician in my dept
does all day long

Rolf Turner-3 wrote:
> 
> 
> On 21/07/2009, at 5:30 AM, 1Rnwb wrote:
> 
>>
>> Please explain me as what it means and how this analysis can be  
>> done using R
>> and which library(ies) are needed.
>> Thanks
> 
> Go stick your head in a pig! (***)
> 
>   cheers,
> 
>   Rolf Turner
> 
> 
> (***) Motto of the Sirius Cybernetics Corporation --- see ``The  
> Hitchhiker's
> Guide to the Galaxy''.
> 
> ##
> Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Regression-using-age-and-Duration-of-disease-as-a-continous-factors-tp24574133p24577992.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-21 Thread 1Rnwb

Thanks Steve,Thanks for the explanation,  I agree the question is too vague,
I do not what a regression is I have switched to R a couple of months ago,
after working in Excel for a long time.  I also know the lm, glm functions
in R. but due to my data I am completely lost.  it looks like the experts
individuals just come to poke fun at our expesense who has no background of
statistics. 

I have a 8 proteins and I have two groups with 840 samples in control and
1140 samples in diseases further stratified by sex, draw age, duration of
disease. all these groups and sub groups is making the thing very confusing
as how to do the regression in R. the pupose is to show the changes in the
levels of these proteins as the disease progress or changes in their levels
with respect to progression in age, effect of gender, SNPs for these
proteins, it is a pretty big dataset. 

The suggestion that consult the statistician is kind of funny as  the
statistician in my center is my co-mentor and from past 5 years he is
sitting on the data without any output. 

I am not here to ask someone to do my data analysis, but to get an
understanding of the process as well as a proper direction to look for the
analysis.  after all I do have to explain all these things to my boss as
well. 

Thanks



Steve Lianoglou-6 wrote:
> 
> 
> On Jul 20, 2009, at 5:30 PM, 1Rnwb wrote:
> 
>> I have read that multiple times without understanding anything.
> 
> If that's the case, then perhaps you should follow Greg's first piece  
> of advice:
> 
>> Greg Snow-2 wrote:
>>>
>>> If you need an explanation of what regression means, then you need  
>>> to take
>>> a course or 2 at your local university, or at least hire a  
>>> statistical
>>> consultant.
> 
> We're not trying to be rude, but your question is quite ill formed,  
> and no one can really help you:
> 
>> Please explain me as what it means and how this analysis can be done
>> using R and which library(ies) are needed.
> 
> It's not clear what you do/don't understand, and your problem  
> statement is too vague for anyone to tell you more.
> 
> It seems like you're saying you don't understand what "regression" is,  
> in which case a simple email will not help you.
> 
> "Simply put" regression is a method to predict a (typically)  
> "continuous" output by some combination of inputs, eg. predicting  
> someone's height by knowing their weight and shoe size (these are  
> continuous variables, too). It looks like in your case, your "inputs"  
> are the "continuous factors" of your email subject, which are age and  
> duration of disease?
> 
> You haven't even mentioned what it is you are trying to predict.  
> Survival?
> 
> The thing is, as soon as one puts something in "simple terms," it's  
> often wrong -- which is why Greg suggested taking a class or hiring  
> someone to help you.
> 
> Anyway, I'm assuming you must know what regression is, otherwise you  
> wouldn't be looking to know how to do it. One way to perform linear  
> regression in R is using the "lm" function. Type ?lm at the R prompt  
> for help.
> 
> 
>> I thought this forum is for help. now i know what the statistician  
>> in my dept
>> does all day long
> 
> It is for help -- you'll see it's quite active around here.
> 
> It's *not* for soliciting other people to do your analysis for you,  
> which is how your email comes across. All of us have our own work to  
> do, but are here to help if you're stuck on something *in  
> particular* ... perhaps you can do a bit more legwork and rephrase  
> your question in a more meaningful way.
> 
> -steve
> 
> --
> Steve Lianoglou
> Graduate Student: Physiology, Biophysics and Systems Biology
> Weill Medical College of Cornell University
> 
> Contact Info: http://cbio.mskcc.org/~lianos/contact
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Regression-using-age-and-Duration-of-disease-as-a-continous-factors-tp24574133p24591056.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R Codes for fitting Logistic Regression for Multivaraite Data

2009-07-31 Thread 1Rnwb

usually i go thru the manuals of the libraries and the data attached with the
libraries to get the code working for my data. not a good way but usually it
works out.

Nimal Fernando wrote:
> 
> Hi
> 
> It would be a great help if someone can direct me to access some existing
> R
> codes for fitting Logistic regression models for Multivariate data. I want
> to find some Robust Estimates (M) for these models.
> 
> Thanks a lot
> 
> Best Regards
> 
> Nimal
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/R-Codes-for-fitting-Logistic-Regression-for-Multivaraite-Data-tp24706374p24757203.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Antw: How to extract the upper xlim and ylim of my plot?

2009-07-31 Thread 1Rnwb

use hilox<-range.x=range(x variable) and hiloy<-range.y=range(y variable)

or store these values in vectors to be later on user as xlim=hilox,
ylim=hiloy

Frank Bloos wrote:
> 
> You may want to use the function corner.label from the plotrix-package.
>  
> Frank
> 
 Mark Na  21.07.2009 23:03 >>>
> Dear R-helpers,
> 
> I wish to place some text in a plot, at approx 10% of my upper xlim
> and
> approx 90% of my upper ylim, i.e.
> 
>> plot(log(all$SR,10)~log(all$AREA,10))
>> text(.1*max(xlim),.9*max(ylim),"text to be placed")
> 
> (I know how to give absolute coordinates for text location, but I wish
> to
> use relative coordinates).
> 
> My code (above) doesn't work because I don't know how to properly
> extract
> the upper xlim and ylim values.
> 
> Does anyone know how I could extract the upper xlim and ylim values
> (without
> using max(x-variable) or max (y-variable)...I wish to keep this as
> general
> as possible and not point to the original data.
> 
> Thanks in advance,
> 
> Mark
> 
> [[alternative HTML version deleted]]
> 
> 
> 
> 
> Universitätsklinikum Jena
> Körperschaft des öffentlichen Rechts und Teilkörperschaft der
> Friedrich-Schiller-Universität Jena 
> Bachstraße 18, 07743 Jena
> Verwaltungsratsvorsitzender: Prof. Dr. Walter Bauer-Wabnegg;
> Medizinischer Vorstand: Prof. Dr. Klaus Höffken;
> Wissenschaftlicher Vorstand: Prof. Dr. Klaus Benndorf; Kaufmännischer
> Vorstand und Sprecher des Klinikumsvorstandes Rudolf Kruse 
> Bankverbindung: Sparkasse Jena; BLZ: 830 530 30; Kto.: 221;
> Gerichtsstand Jena
> Steuernummer: 161/144/02978; USt.-IdNr. : DE 150545777
> 
> 
>   [[alternative HTML version deleted]]
> 
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Antw%3A--How-to-extract-the-upper-xlim-and-ylim-of-my-plot--tp24619947p24757330.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Newbie in R: Reading .txt files and storing the 'numbers' in a vector

2009-07-31 Thread 1Rnwb

I am also a newbie, but here are the few thing i do
eo=read.table(file="path where you have saved your text
file/xxx.txt",header=T, )   
#this will only read excelfiles saved
as *.csv file
attach(eo)  
#attach the data
names(eo)

go to this website http://www.statmethods.net/stats
here is how to store numbers as vectors
a<-c(1,2,3,4,5,6,7)
here is how i means as vector
d<-aggregate(LMMP8,list(PlateID,Self_T1D),mean, na.rm=T)

I would suggest u to search for website for R tutorials
here are some good ones
go to this website http://www.statmethods.net/stats
http://cran.r-project.org/doc/contrib/Lemon-kickstart/kr_ttest.html
this one has all the codes you can change them according to your data
http://www3.imperial.ac.uk/pls/portallive/docs/1/1171930.TXT
http://www.mayin.org/ajayshah/KB/R/index.html

also download the book by verjani it would be a great help to you.



Patrick Schorderet wrote:
> 
> 
> Hello everybody,
> 
> I'm a newbie in R and just went through an introduction class recently.
> 
> Here's my problem.
> I have 2 text files (.txt) with plain numbers ('doubles' for those who  
> know c++) ordered into 2 columns as below:
> 
> coordinate1   value1
> coordinate2   value2
> coordinate3   value3
> ...   ...
> coordinateN   valueN
> 
> I would like to write a small programme in which i would:
> 1. take all values of file 1 and store them in a vector
> 2. substract to those all values of file 2 (one by one) and store the  
> result in a new vector
> 3. Create a sliding window of chosen size and calculate the  
> mathematical average and store these averages in a new vector
> 4. Plot the different graphes with a bar plot
> 
> So I wrote a c++ script that does the first parts and writes the  
> averages in a output.txt file (which I have up and running).  
> Unfortunately, I seem to fail in reading these as numbers and putting  
> them into a vector (in the R environment). I can read the file , but  
> this is what I get:
> 
>  > z=scan(file = "/Users/NCCRGENETICS/Desktop/testRnumbers.txt", what  
> = "double")
> Read 19 items
>  > z
>   [1] "{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasubrtf430"
>   [2] "{\\fonttbl\\f0\\fswiss\\fcharset0"
>   [3] "Helvetica;}"
>   [4] "{\\colortbl;\\red255\\green255\\blue255;}"
>   [5] "\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww9000\ 
> \viewh8400\\viewkind0"
>   [6] "\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\ 
> \tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural"
>   [7] "\\f0\\fs24"
>   [8] "\\cf0"
>   [9] "13\\"  // This is where my file "should" start 
>  
> reading the numbers I see in the window when I open it with textedit
> [10] "27\\"
> [11] "39\\"
> [12] "48\\"
> [13] "34\\"
> [14] "17\\"
> [15] "23\\"
> [16] "45\\"
> [17] "23\\"
> [18] "4\\"
> [19] "}"
>  >
> 
> Thanks so much to any of you who could provoid a little help... I'm  
> getting nuts.
> Patrick
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-in-R%3A-Reading-.txt-files-and-storing-the-%27numbers%27-in-a-vector-tp24714734p24757501.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] need help for t.test using "by"

2009-08-18 Thread 1Rnwb

I am trying to do ttest for each plate which has equal number of disease and
controls. by searching this forum I found one posting suggesting OP to use
"by(eo,PlateID, function(.sub) t.test(IL1Ra~Group,data=.sub))". when i
modified this for my use I used to get the pvalues for each plate, recently
upgraded to R2.9.x and now i am getting following error when i use this 
> by(eo,PlateID, function(.sub) t.test(IL1Ra~Group,data=.sub))
Error in t.test.formula(IL1Ra ~ Group, data = .sub) : 
  grouping factor must have exactly 2 levels

I checked my data file and the plate ID has "P16-P47" and the disease column
is "Y/N". I have search all but could not locate the answer. Can anyone
suggest me the direction where i am going wrong. 
for more detail i amm posting a part of my data.

SampleIDPlateID Sex Disease DurationAge prt1prt2
prt3prt4
1   P16 F   N   25.33282811 836.08979   
20.04582692 295.74  11731.43
2   P16 F   N   32.74912883 243.0652116 
53.16487056 383.63  4451.36
3   P16 M   N   3.49961999  181.5587298 
23.24604762 522.52  325.52
4   P16 M   N   5.249771666 261.0978097 
19.69024684 833.61  2229.04
5   P16 M   N   39.16612385 237.334794  
83.97284692 694.03  1204.36
6   P16 F   N   33.49929145 540.486536  
29.69569346 895.36  72105.75
7   P16 F   N   3.915997361 5215.378446 
35.44324704 1023.63 101680.69
8   P16 F   N   33.49929145 466.5188732 
12.93422535 814.26  7169.61
9   P16 F   N   38.1661348  706.5117791 
19.69024684 331.62  7296.72
10  P16 M   N   0.916030215 242.3011559 
36.40117263 90.135962.08
11  P16 F   Y   14975.2542.08281552 133.8052501 
29.0570764  260.55  1280.29
12  P16 M   Y   1095.75 40.41593932 247.6495456 
19.69024684 161.64  6685.6
13  P16 F   Y   292225.08300169 231.6043765 
9.022844487 902.53  37571.39
14  P16 F   Y   12053.2537.49924765 158.6370595 
24.90606549 1.63471.15
15  P16 F   Y   14610   76.58209602 278.3837309 
41.51010914 152.13  16285.49
16  P16 F   Y   3287.25 49.58239171 128.4568603 
17.91234645 274.99  41823.21
17  P17 M   N   2.333079994 397.4440508 
55.20987654 366.37  90011.27
18  P17 F   N   4.749435461 222.0839813 
73.62489675 271.65  903.89
19  P17 F   N   1.749468315 676.8904636 
47.7037037  721.19  663.15
20  P17 M   N   33.24946503 413.712486  
27.42386831 611.64  4195.86
21  P17 F   N   15.4162131  346.9913086 
30.71604938 302.29  2151.47
22  P17 F   N   33.3327405  2598.071161 
107.8088094 1800.44 102005.12
23  P17 M   N   9.832656179 3296.535581 
54.1563786  2642.73 676.78
24  P17 F   N   3.749446413 488.2589867 
15.29151952 562.88  11619.62
25  P17 M   N   9.749380705 159.1536586 
23.41690259 132.64  931.14
26  P17 M   Y   12053.2550.91548265 173.7764722 
18.90280088 52.25   15962.05
27  P17 M   Y   3652.5  25.83248096 264.8254141 
35.32510288 497.33  15504.95
28  P17 F   Y   28.41607073 415.3599225 
35.0617284  1600.67 14224.39
29  P17 F   Y   6209.25 60.74882219 213.7280879 
44.41152263 111.36  9018.48
30  P17 M   Y   4748.25 47.33258719 264.0016959 
31.24279835 366.81  3809.83
31  P17 M   Y   16071   54.49906148 112.4128794 
34.40329218 114.56  1727.02
32  P17 M   Y   7670.25 52.33253243 145.5753317 
32.2962963  44.92   15264.84
33  P17 M   Y   876631.74913978 220.2561296 
34.40329218 130.31  2377.36
34  P17 F   Y   8400.75 40.83231669 194.6662059 
48.09876543 407.83  19587.61
35  P17 M   Y   12053.2536.1661567  212.1613578 
96.51775947 621.42  3269.9
36  P17 M   Y   8035.5  57.91540599 115.2852178 
24.79012346 282.88  8960.27
37  P17 M   Y   5478.75 36.33270765 160.4592669 
40.72427984 102.32  5006.77
38  P17 F   Y   9496.5  34.74910692 329.8991551 
40.32921811 417.32  248857.58
39  P18 F   N   14.2496731  538.5430144 
54.34303351  

Re: [R] need help for t.test using "by"

2009-08-19 Thread 1Rnwb

any one

1Rnwb wrote:
> 
> I am trying to do ttest for each plate which has equal number of disease
> and controls. by searching this forum I found one posting suggesting OP to
> use "by(eo,PlateID, function(.sub) t.test(IL1Ra~Group,data=.sub))". when i
> modified this for my use I used to get the pvalues for each plate,
> recently upgraded to R2.9.x and now i am getting following error when i
> use this 
> > by(eo,PlateID, function(.sub) t.test(IL1Ra~Group,data=.sub))
> Error in t.test.formula(IL1Ra ~ Group, data = .sub) : 
>   grouping factor must have exactly 2 levels
> 
> I checked my data file and the plate ID has "P16-P47" and the disease
> column is "Y/N". I have search all but could not locate the answer. Can
> anyone suggest me the direction where i am going wrong. 
> for more detail i amm posting a part of my data.
> 
> SampleID  PlateID Sex Disease DurationAge prt1prt2
> prt3prt4
> 1 P16 F   N   25.33282811 836.08979   
> 20.04582692 295.74  11731.43
> 2 P16 F   N   32.74912883 243.0652116 
> 53.16487056 383.63  4451.36
> 3 P16 M   N   3.49961999  181.5587298 
> 23.24604762 522.52  325.52
> 4 P16 M   N   5.249771666 261.0978097 
> 19.69024684 833.61  2229.04
> 5 P16 M   N   39.16612385 237.334794  
> 83.97284692 694.03  1204.36
> 6 P16 F   N   33.49929145 540.486536  
> 29.69569346 895.36  72105.75
> 7 P16 F   N   3.915997361 5215.378446 
> 35.44324704 1023.63 101680.69
> 8 P16 F   N   33.49929145 466.5188732 
> 12.93422535 814.26  7169.61
> 9 P16 F   N   38.1661348  706.5117791 
> 19.69024684 331.62  7296.72
> 10P16 M   N   0.916030215 242.3011559 
> 36.40117263 90.135962.08
> 11P16 F   Y   14975.2542.08281552 133.8052501 
> 29.0570764  260.55  1280.29
> 12P16 M   Y   1095.75 40.41593932 247.6495456 
> 19.69024684 161.64  6685.6
> 13P16 F   Y   292225.08300169 231.6043765 
> 9.022844487 902.53  37571.39
> 14P16 F   Y   12053.2537.49924765 158.6370595 
> 24.90606549 1.63471.15
> 15P16 F   Y   14610   76.58209602 278.3837309 
> 41.51010914 152.13  16285.49
> 16P16 F   Y   3287.25 49.58239171 128.4568603 
> 17.91234645 274.99  41823.21
> 17P17 M   N   2.333079994 397.4440508 
> 55.20987654 366.37  90011.27
> 18P17 F   N   4.749435461 222.0839813 
> 73.62489675 271.65  903.89
> 19P17 F   N   1.749468315 676.8904636 
> 47.7037037  721.19  663.15
> 20P17 M   N   33.24946503 413.712486  
> 27.42386831 611.64  4195.86
> 21P17 F   N   15.4162131  346.9913086 
> 30.71604938 302.29  2151.47
> 22P17 F   N   33.3327405  2598.071161 
> 107.8088094 1800.44 102005.12
> 23P17 M   N   9.832656179 3296.535581 
> 54.1563786  2642.73 676.78
> 24P17 F   N   3.749446413 488.2589867 
> 15.29151952 562.88  11619.62
> 25P17 M   N   9.749380705 159.1536586 
> 23.41690259 132.64  931.14
> 26P17 M   Y   12053.2550.91548265 173.7764722 
> 18.90280088 52.25   15962.05
> 27P17 M   Y   3652.5  25.83248096 264.8254141 
> 35.32510288 497.33  15504.95
> 28P17 F   Y   28.41607073 415.3599225 
> 35.0617284  1600.67 14224.39
> 29P17 F   Y   6209.25 60.74882219 213.7280879 
> 44.41152263 111.36  9018.48
> 30P17 M   Y   4748.25 47.33258719 264.0016959 
> 31.24279835 366.81  3809.83
> 31P17 M   Y   16071   54.49906148 112.4128794 
> 34.40329218 114.56  1727.02
> 32P17 M   Y   7670.25 52.33253243 145.5753317 
> 32.2962963  44.92   15264.84
> 33P17 M   Y   876631.74913978 220.2561296 
> 34.40329218 130.31  2377.36
> 34P17 F   Y   8400.75 40.83231669 194.6662059 
> 48.09876543 407.83  19587.61
> 35P17 M   Y   12053.2536.1661567  212.1613578 
>

Re: [R] Fitting a logistic regression

2009-08-19 Thread 1Rnwb

with my limited understanding, I am not surprised to see this data fitting
nicely at the end just by eyeballing at it. the reaction at the early time
point is not completed as the time passes which is close to 20 units the
reaction generates more metabolite to be measured reliably your t=0 and t=10
are basically the same, if i limit the digits to 2 then the values will be
0.20. you can do the log transform and then try to fit it.


Dani Valverde-4 wrote:
> 
> Hello,
> I have this data:
>   Time  AMP
>  0 0.200
> 10 0.1958350
> 20 0.2914560
> 40 0.6763628
> 60 0.8494534
> 90 0.9874526
>120 1.0477692
> 
> where AMP is the concentration of this metabolite with time. If you plot
> the data, you can see that it could be fitted using a logistic
> regression. For this purpose, I used this code:
> 
> AMP.nls <- nls(AMP~SSlogis(Time,Asym, xmid, scal), data =
> concentrations,model=T)
> 
> When plotting the fitted function, it seems that it fits quite well at
> the end of the time. However, at the beginning it seems that the fit is
> not so good. How can I achieve a better fit? Forgive me if it is a
> stupid question, but I am just starting with non linear regression.
> Thank you,
> 
> Dani
> -- 
> [?]
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Fitting-a-logistic-regression-tp25041444p25043712.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] need help for t.test using "by"

2009-08-19 Thread 1Rnwb

Thanks for the reply, and sorry for not being clear, I have ELISA data for 50
plates, equal number of disease and control samples are located on each
plates. I need to do the ttest between each proteins listed as prt1, prt2...
prt50 on all the plates 1-50, however for some proteins i have data for 40
plates and that is creating the problem for me when I run  
"by(eo,eo$PlateID, function(.sub) t.test(prt1~Disease,data=.sub))". If i
only take the data for 40 plates, this command works, unfortunately I do not
want to make multiple copies of the same data over to do things.
Similarly"by(eo,eo$sex,function(.sub) t.test(prt1~Disease,data=.sub))" is
also not working when I select the data for 40 plates. I used these two
formulas earlier sucessfully. I am uploading a part of data as a delim file
for sample http://www.nabble.com/file/p25051220/r..txt r..txt . Thanks

1Rnwb wrote:
> 
> any one
> 
> 1Rnwb wrote:
>> 
>> I am trying to do ttest for each plate which has equal number of disease
>> and controls. by searching this forum I found one posting suggesting OP
>> to use "by(eo,PlateID, function(.sub) t.test(IL1Ra~Group,data=.sub))".
>> when i modified this for my use I used to get the pvalues for each plate,
>> recently upgraded to R2.9.x and now i am getting following error when i
>> use this 
>> > by(eo,PlateID, function(.sub) t.test(IL1Ra~Group,data=.sub))
>> Error in t.test.formula(IL1Ra ~ Group, data = .sub) : 
>>   grouping factor must have exactly 2 levels
>> 
>> I checked my data file and the plate ID has "P16-P47" and the disease
>> column is "Y/N". I have search all but could not locate the answer. Can
>> anyone suggest me the direction where i am going wrong. 
>> for more detail i amm posting a part of my data.
>> 
>> SampleID PlateID Sex Disease DurationAge prt1prt2
>> prt3prt4
>> 1P16 F   N   25.33282811 836.08979   
>> 20.04582692 295.74  11731.43
>> 2P16 F   N   32.74912883 243.0652116 
>> 53.16487056 383.63  4451.36
>> 3P16 M   N   3.49961999  181.5587298 
>> 23.24604762 522.52  325.52
>> 4P16 M   N   5.249771666 261.0978097 
>> 19.69024684 833.61  2229.04
>> 5P16 M   N   39.16612385 237.334794  
>> 83.97284692 694.03  1204.36
>> 6P16 F   N   33.49929145 540.486536  
>> 29.69569346 895.36  72105.75
>> 7P16 F   N   3.915997361 5215.378446 
>> 35.44324704 1023.63 101680.69
>> 8P16 F   N   33.49929145 466.5188732 
>> 12.93422535 814.26  7169.61
>> 9P16 F   N   38.1661348  706.5117791 
>> 19.69024684 331.62  7296.72
>> 10   P16 M   N   0.916030215 242.3011559 
>> 36.40117263 90.135962.08
>> 11   P16 F   Y   14975.2542.08281552 133.8052501 
>> 29.0570764  260.55  1280.29
>> 12   P16 M   Y   1095.75 40.41593932 247.6495456 
>> 19.69024684 161.64  6685.6
>> 13   P16 F   Y   292225.08300169 231.6043765 
>> 9.022844487 902.53  37571.39
>> 14   P16 F   Y   12053.2537.49924765 158.6370595 
>> 24.90606549 1.63471.15
>> 15   P16 F   Y   14610   76.58209602 278.3837309 
>> 41.51010914 152.13  16285.49
>> 16   P16 F   Y   3287.25 49.58239171 128.4568603 
>> 17.91234645 274.99  41823.21
>> 17   P17 M   N   2.333079994 397.4440508 
>> 55.20987654 366.37  90011.27
>> 18   P17 F   N   4.749435461 222.0839813 
>> 73.62489675 271.65  903.89
>> 19   P17 F   N   1.749468315 676.8904636 
>> 47.7037037  721.19  663.15
>> 20   P17 M   N   33.24946503 413.712486  
>> 27.42386831 611.64  4195.86
>> 21   P17 F   N   15.4162131  346.9913086 
>> 30.71604938 302.29  2151.47
>> 22   P17 F   N   33.3327405  2598.071161 
>> 107.8088094 1800.44 102005.12
>> 23   P17 M   N   9.832656179 3296.535581 
>> 54.1563786  2642.73 676.78
>> 24   P17 F   N   3.749446413 488.2589867 
>> 15.29151952 562.88  11619.62
>> 25   P17 M   N   9.749380705 159.15

[R] extracting pvalues from ttest

2009-08-28 Thread 1Rnwb

Hello list,

I have a similar issue as this post
http://tolstoy.newcastle.edu.au/R/e6/help/09/04/11438.html#options2 and I
used the suggestion provided by Jorge with modifications to my data
do.call(c,lapply(your_list_with_the_t_tests,function(x) x$p.value)) 

but I am getting the following error after excuting the code

B<-by(eo,eo$PlateID, function(.sub) t.test(mcp1~Self_T1D,data=.sub,
na.rm=T)) #ttest platewise
do.call(c,lapply(B, function(x) x$p.value)) 
Error in do.call(c, lapply(B, function(x) x$p.value)) : 
  'what' must be a character string or a function

here "B" is equal to "your_list_with_the_t_tests. is something i am doing
wrong
> 
-- 
View this message in context: 
http://www.nabble.com/extracting-pvalues-from-ttest-tp25192381p25192381.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] extracting pvalues from ttest

2009-09-08 Thread 1Rnwb

okay fixed it by putting "c" in quote marks. 


1Rnwb wrote:
> 
> Hello, I am using "B" as a vector to store all the t.tests. since i am a
> newbie to both R and statistics I am not sure if "B" is the list. Also I
> see "c" used in the do.call formula and do not know what it is being used
> for. I used aggregate but getting this error" Error in
> aggregate.data.frame(eo, eo$PlateID, function(.sub) t.test(ENA78 ~  :  
> 'by' must be a list". 
> As i mention in my OP that I am using is function from an earlier post.
> any help is appreciated.
> Thanks
> Sharad
> 
> 
> Jun Shen-3 wrote:
>> 
>> I never used "by". Is "B" a list? If not, I am not sure if lapply can
>> take
>> it. Try aggregate().
>> 
>> On Fri, Aug 28, 2009 at 10:53 AM, 1Rnwb  wrote:
>> 
>>>
>>> Hello list,
>>>
>>> I have a similar issue as this post
>>> http://tolstoy.newcastle.edu.au/R/e6/help/09/04/11438.html#options2 and
>>> I
>>> used the suggestion provided by Jorge with modifications to my data
>>> do.call(c,lapply(your_list_with_the_t_tests,function(x) x$p.value))
>>>
>>> but I am getting the following error after excuting the code
>>>
>>> B<-by(eo,eo$PlateID, function(.sub) t.test(mcp1~Self_T1D,data=.sub,
>>> na.rm=T)) #ttest platewise
>>> do.call(c,lapply(B, function(x) x$p.value))
>>> Error in do.call(c, lapply(B, function(x) x$p.value)) :
>>>  'what' must be a character string or a function
>>>
>>> here "B" is equal to "your_list_with_the_t_tests. is something i am
>>> doing
>>> wrong
>>> >
>>> --
>>> View this message in context:
>>> http://www.nabble.com/extracting-pvalues-from-ttest-tp25192381p25192381.html
>>> Sent from the R help mailing list archive at Nabble.com.
>>>
>>> __
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>> 
>>  [[alternative HTML version deleted]]
>> 
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/extracting-pvalues-from-ttest-tp25192381p25349826.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] extracting pvalues from ttest

2009-09-08 Thread 1Rnwb

Hello, I am using "B" as a vector to store all the t.tests. since i am a
newbie to both R and statistics I am not sure if "B" is the list. Also I see
"c" used in the do.call formula and do not know what it is being used for. I
used aggregate but getting this error" Error in aggregate.data.frame(eo,
eo$PlateID, function(.sub) t.test(ENA78 ~  :   'by' must be a list". 
As i mention in my OP that I am using is function from an earlier post.
any help is appreciated.
Thanks
Sharad


Jun Shen-3 wrote:
> 
> I never used "by". Is "B" a list? If not, I am not sure if lapply can take
> it. Try aggregate().
> 
> On Fri, Aug 28, 2009 at 10:53 AM, 1Rnwb  wrote:
> 
>>
>> Hello list,
>>
>> I have a similar issue as this post
>> http://tolstoy.newcastle.edu.au/R/e6/help/09/04/11438.html#options2 and I
>> used the suggestion provided by Jorge with modifications to my data
>> do.call(c,lapply(your_list_with_the_t_tests,function(x) x$p.value))
>>
>> but I am getting the following error after excuting the code
>>
>> B<-by(eo,eo$PlateID, function(.sub) t.test(mcp1~Self_T1D,data=.sub,
>> na.rm=T)) #ttest platewise
>> do.call(c,lapply(B, function(x) x$p.value))
>> Error in do.call(c, lapply(B, function(x) x$p.value)) :
>>  'what' must be a character string or a function
>>
>> here "B" is equal to "your_list_with_the_t_tests. is something i am doing
>> wrong
>> >
>> --
>> View this message in context:
>> http://www.nabble.com/extracting-pvalues-from-ttest-tp25192381p25192381.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/extracting-pvalues-from-ttest-tp25192381p25348965.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.