[R] Problem in performing goodness of fit test in R.

2010-02-13 Thread Faiz Rasool
I am trying to perform goodness of fit test using R. I am using this website http://wiener.math.csi.cuny.edu/Statistics/R/simpleR/stat013.html for help. However, I am unable to carry out the test successfully. My code follows. It is taken from the website just mentioned. freq=c(22,21,22,27,22,3

Re: [R] SAS and RODBC

2010-02-13 Thread Daniel Nordlund
> -Original Message- > From: Frank E Harrell Jr [mailto:f.harr...@vanderbilt.edu] > Sent: Saturday, February 13, 2010 5:49 AM > To: Daniel Nordlund > Cc: r-help@r-project.org > Subject: Re: [R] SAS and RODBC > > Daniel Nordlund wrote: > . . . > > > > > This is just a quick follow-up to my

Re: [R] NextMethod() example from S Programming by Vena bles and Ripley (page 78)

2010-02-13 Thread Ken Knoblauch
blue sky gmail.com> writes: > S Programming by Venables and Ripley (page 78) has the example listed > at the end of this email. However, I get the following error when I > try the example. I don't understand the descriptions of NextMethod on > its help page. Could somebody let me know how to fix t

[R] NextMethod() example from S Programming by Venables and Ripley (page 78)

2010-02-13 Thread blue sky
S Programming by Venables and Ripley (page 78) has the example listed at the end of this email. However, I get the following error when I try the example. I don't understand the descriptions of NextMethod on its help page. Could somebody let me know how to fix the error of this example? > test(x)

[R] Dimensional reduction package

2010-02-13 Thread mauede
Is there any R package which implements non-linear dimensionality reduction (LLE, ISOMAP, GTM, and so on) and/or intrinsic dimensionality estimation ? Thank you, Maura tutti i telefonini TIM! [[alternative HTML version deleted]] __ R-help@r

Re: [R] lm function in R

2010-02-13 Thread Ista Zahn
Dear Something, I think you have no hope of completing this project without going back to an introductory regression text. The two models you listed (Y-Hat = b0 + b1X1 + b2X2 + . . . bkXk + · · · + bkXk) and (Y-Hat = b0 + b1X1 + b2x2 + ... + bkXk + b12 X12+ b13 X13 +  + c) are identical exc

Re: [R] Hierarchical data sets: which software to use?

2010-02-13 Thread kMan
Dear Anton, 4Mb is not a lot of data. A Gb still wouldn't be that troublesome in a flat file. Your data can be migrated to a relational database at a future point. Sincerely, KeithC. -Original Message- From: Anton du Toit [mailto:atdutoitrh...@gmail.com] Sent: Saturday, February 13, 20

Re: [R] lm function in R

2010-02-13 Thread Daniel Malter
It seems to me that your question is more about the econometrics than about R. Any introductory econometric textbook or compendium on econometrics will cover this as it is a basic. See, for example, Greene 2006 or Wooldridge 2002. Say X is your data matrix, that contains columns for each of the in

Re: [R] lm function in R

2010-02-13 Thread Something Something
>>From your question it is difficult to determine what sort of tutoring you are expecting. The kind of tutoring you are providing is definitely helpful :) I guess I should quickly explain what I am trying to accomplish. I have been a computer scientist for quite a few years, but I studied Statist

Re: [R] lm function in R

2010-02-13 Thread Gabor Grothendieck
You can find out the model matrix like this where we use the builtin data frame CO2 to illustrate: fo <- uptake ~ Treatment * Type mod <- lm(fo, CO2); mod mm <- model.matrix(fo, CO2) View(mm) On Sat, Feb 13, 2010 at 5:03 PM, Something Something wrote: > I tried.. > > mod = lm(Y ~ X1*X2*X3, na.

Re: [R] lm function in R

2010-02-13 Thread David Winsemius
On Feb 13, 2010, at 5:03 PM, Something Something wrote: I tried.. mod = lm(Y ~ X1*X2*X3, na.action = na.exclude) formula(mod) This produced Y ~ X1 * X2 * X3 When I typed just mod I got: Call: lm(formula = Y ~ X1 * X2 * X3, na.action = na.exclude) Coefficients: (Intercept) X11

Re: [R] NMDS ordination

2010-02-13 Thread Dan Davison
Aisyah ioz.ac.uk> writes: > > > Hi > > Im currently trying to plot my NMDS data together with fitted variables > (envfit funct) on an ordination plot. The plot function shows two > displays="sites" and "sp". I was wondering how to plot it so that the sites > come up as different points for dif

Re: [R] lm function in R

2010-02-13 Thread Something Something
I tried.. mod = lm(Y ~ X1*X2*X3, na.action = na.exclude) formula(mod) This produced Y ~ X1 * X2 * X3 When I typed just mod I got: Call: lm(formula = Y ~ X1 * X2 * X3, na.action = na.exclude) Coefficients: (Intercept) X11 X21 X31 X11:X21 X11:X31 X2

Re: [R] (no subject)

2010-02-13 Thread Ben Bolker
[cc'ing back to r-help] You need to get the separator right: you specify slashes below where your date is space-separated as.Date("02 03 2008", format="%m %d %Y") note that the solution I gave you below assumed that your dates were in d/m/Y order (since you didn't specify). You will have

Re: [R] Highlighting points in a quantile plot for different values of a second column

2010-02-13 Thread Peter Ehlers
Saptarshi Guha wrote: Hello, I have the following data frame, using lattice and qqmath, how do I display the quantile plot (e.g distribution = qunif), but highlight the f==TRUE and f==FALSE differently? library(lattice) pp <- function(n) ((1:n)-0.5)/n x=data.frame(x=runif(20),f=sapply(runif(20)

Re: [R] lm function in R

2010-02-13 Thread Bert Gunter
?formula Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Something Something Sent: Saturday, February 13, 2010 1:24 PM To: Daniel Nordlund Cc: r-help@r-project.org Subject: Re: [R] lm f

Re: [R] lm function in R

2010-02-13 Thread Something Something
Thanks Dan. Yes that was very helpful. I didn't see the change from '*' to '+'. Seems like when I put * it means - interaction & when I put + it's not an interaction. Is it correct to assume then that... When I put + R evaluates the following equation: Y-Hat = b0 + b1X1 + b2X2 + . . . bkXk + ·

Re: [R] Plot different regression models on one graph

2010-02-13 Thread Bert Gunter
Brian Joiner, my teacher and insightful guide to the world of applied statistics when I was a student, succinctly summarized this discussion by: "Even the data aren't sufficient." (This is an inside joke for statisticians). Cheers, Bert Bert Gunter Genentech Nonclinical Statistics -Origin

[R] NMDS ordination

2010-02-13 Thread Aisyah
Hi Im currently trying to plot my NMDS data together with fitted variables (envfit funct) on an ordination plot. The plot function shows two displays="sites" and "sp". I was wondering how to plot it so that the sites come up as different points for different sites but the species come up as actua

Re: [R] max and in the zoo package

2010-02-13 Thread Gabor Grothendieck
Try this: > library(zoo) > set.seed(1) > z <- zoo(rnorm(100), as.Date(0) + 1:100) > mx <- z[which.max(z)]; mx 1970-03-03 2.401618 > coredata(mx) [1] 2.401618 > time(mx) [1] "1970-03-03" On Sat, Feb 13, 2010 at 3:39 PM, Edouard Tallent wrote: > hi everyone. > i am dealing on a zoo-class object.

[R] Highlighting points in a quantile plot for different values of a second column

2010-02-13 Thread Saptarshi Guha
Hello, I have the following data frame, using lattice and qqmath, how do I display the quantile plot (e.g distribution = qunif), but highlight the f==TRUE and f==FALSE differently? library(lattice) pp <- function(n) ((1:n)-0.5)/n x=data.frame(x=runif(20),f=sapply(runif(20),function(r) r>0.5)) I

[R] max and in the zoo package

2010-02-13 Thread Edouard Tallent
hi everyone. i am dealing on a zoo-class object.i am aware of the 'min' and 'max' function to get the minimum and the maximum values.getting these maximum and minimum values is ont thing.but, how to get the (zoo) dates these values occur ? in fact, in analysing a time series i am interested in th

Re: [R] Plot different regression models on one graph

2010-02-13 Thread Peter Ehlers
Rhonda: As David points out, a cubic fit is rather speculative. I think that one needs to distinguish two situations: 1) theoretical justification for a cubic model is available, or 2) you're dredging the data for the "best" fit. Your case is the second. That puts you in the realm of EDA (explora

Re: [R] how to do calculations in data matrices?

2010-02-13 Thread Dan Davison
Zoppoli, Gabriele (NIH/NCI) [G] mail.nih.gov> writes: > > Please give me just a reference where I can find something useful. The others are right that rather than randomly googling, you should bite the bullet and sit down for a couple of hours with some introductory material on R (a book, or o

Re: [R] Plot different regression models on one graph

2010-02-13 Thread David Winsemius
On Feb 13, 2010, at 1:35 PM, Rhonda Reidy wrote: The following variables have the following significant relationships (x is the explanatory variable): linear, cubic, exponential, logistic. The linear relationship plots without any trouble. Cubic is the 'best' model, but it is not plotting

Re: [R] Plot different regression models on one graph

2010-02-13 Thread Sharpie
Rhonda Reidy wrote: > > The following variables have the following significant relationships (x is > the explanatory variable): linear, cubic, exponential, logistic. The > linear relationship plots without any trouble. > > Cubic is the 'best' model, but it is not plotting as a smooth curve usi

Re: [R] how to do calculations in data matrices?

2010-02-13 Thread Liviu Andronic
On Sat, Feb 13, 2010 at 5:39 PM, Zoppoli, Gabriele (NIH/NCI) [G] wrote: > Please give me just a reference where I can find something useful. > To complement Sarah's suggestions, a good place to start is Quick-R [1]. Liviu [1] http://www.statmethods.net/stats/descriptives.html ___

Re: [R] legend mathematical annotation problem

2010-02-13 Thread David Winsemius
On Feb 13, 2010, at 1:45 PM, David Winsemius wrote: On Feb 13, 2010, at 1:13 PM, Mark Heckmann wrote: 1) I need to plot a legend containing the mathematical symbol greater-than-or-equal sign. And I want the text to start with that symbol. plot(110, 0.8) categories <- expression(blank >= 8

Re: [R] legend mathematical annotation problem

2010-02-13 Thread David Winsemius
On Feb 13, 2010, at 1:13 PM, Mark Heckmann wrote: 1) I need to plot a legend containing the mathematical symbol greater-than-or-equal sign. And I want the text to start with that symbol. plot(110, 0.8) categories <- expression(blank >= 85, 84.9 - 80, 79.9 - 75, 74.9 - 70, 69.9 - 65, 64.9 -

[R] Plot different regression models on one graph

2010-02-13 Thread Rhonda Reidy
The following variables have the following significant relationships (x is the explanatory variable): linear, cubic, exponential, logistic. The linear relationship plots without any trouble. Cubic is the 'best' model, but it is not plotting as a smooth curve using the following code: cubic.lm

[R] legend mathematical annotation problem

2010-02-13 Thread Mark Heckmann
1) I need to plot a legend containing the mathematical symbol greater- than-or-equal sign. And I want the text to start with that symbol. plot(110, 0.8) categories <- expression(blank >= 85, 84.9 - 80, 79.9 - 75, 74.9 - 70, 69.9 - 65, 64.9 - 60, blank< 60) legend(110, 0.8, categories, lty=1:7

Re: [R] (no subject)

2010-02-13 Thread Ben Bolker
Hussain Abusaaq fsu.edu> writes: > I have this vector and I want to change it to date. > > for example G=[05 12 2008] > > or g=[2] > f=[3] > y=[2208] > Something like as.Date(paste(rev(G),collapse="-")) __ R-help@r-project.org mailing list

[R] (no subject)

2010-02-13 Thread Hussain Abusaaq
Hi, I havw some porblem in R and i need your help. I have this vector and I want to change it to date. for example G=[05 12 2008] or g=[2] f=[3] y=[2208] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] how to do calculations in data matrices?

2010-02-13 Thread Sarah Goslee
Some places to start apply() sweep() and any of the good introductory guides to R available online. For finding R material, it's vastly easier to use the custom search engine at www.rseek.org than to wander aimlessly around google trying to find things with "R" in them. We'd be happy to give more

Re: [R] logical operations with lists

2010-02-13 Thread Greg Snow
The fact that A and B have dimensions indicates that they are more than simple vectors. It appears that when you create D you are subsetting columns rather than rows, try: > D <- C[which(C %in% A ==FALSE),] # note the "," Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Cent

[R] how to do calculations in data matrices?

2010-02-13 Thread Zoppoli, Gabriele (NIH/NCI) [G]
Please give me just a reference where I can find something useful. In summary, I need to : - find the median of each row of a matrix - create a new matrix with each value in the first matrix divided by the median of its row - if a value "a" in the second matrix is < 1, I need to substitute it w

Re: [R] Multiple figures margin problem

2010-02-13 Thread Greg Snow
I still have not received a copy of the esp package, so I don't know what exactly you tried, or what the results are. The following works for me and seems to fit your description, but without code and details of the results and how they differ from what you expect, we can only guess. x1 <- run

Re: [R] Labels on a pyramide

2010-02-13 Thread Orvalho Augusto
This is good! Yes I must learn about dput. Thank you Caveman On Sat, Feb 13, 2010 at 6:57 PM, David Winsemius wrote: > I took a shot at getting "assymetric lableling but it's by no means perfect. > You really, really ,really, should learn to offer data with dput. See below: > > > On Feb 13, 2

Re: [R] Labels on a pyramide

2010-02-13 Thread David Winsemius
I took a shot at getting "assymetric lableling but it's by no means perfect. You really, really ,really, should learn to offer data with dput. See below: On Feb 13, 2010, at 9:27 AM, Orvalho Augusto wrote: I am using pyramid.plot() from the plotrix package. I have something like this ###

Re: [R] Help for numbers close to 1 in R

2010-02-13 Thread Gabor Grothendieck
Check out ?expm1 On Sat, Feb 13, 2010 at 9:17 AM, cjmr wrote: > > Hi all. > > I have a problem with adding 1 and very small numbers > > ex: >>p=1e-49 >>1+p > [1] 1 > > My problem comes from some values of x for the value: >    1-exp(-sum((x-1/sqrt(3))^2)) > the return values are always equivalent

Re: [R] Why double quote is preferred?

2010-02-13 Thread Douglas Bates
On Fri, Feb 12, 2010 at 4:25 PM, blue sky wrote: > ?'`' shows the following: > > "Single and double quotes delimit character constants. They can be > used interchangeably but double quotes are *preferred* (and character > constants are printed using double quotes), so single quotes are > normally

Re: [R] Help for numbers close to 1 in R

2010-02-13 Thread Liviu Andronic
On Sat, Feb 13, 2010 at 2:17 PM, cjmr wrote: >>p=1e-49 >>1+p > [1] 1 > Try this: > source("http://r-bc.googlecode.com/svn/trunk/R/bc.R";) > p <- bc(1e-49) > p [1] ".1" > 1+p [1] "1.1" You might want t

Re: [R] How to create probeAnno object?

2010-02-13 Thread Martin Morgan
On 02/11/2010 08:03 PM, AMBUJ wrote: > Hi, > Thank you Viviana for the description to create probeAnno object. > The below link was very helpful: > http://svitsrv25.epfl.ch/R-doc/library/Ringo/html/probeAnnoClass.html This is just the help page for one of Ringo's classes. It's ava

Re: [R] Using getSYMBOL, annotate package on a list with empty elements.

2010-02-13 Thread Martin Morgan
On 02/13/2010 07:17 AM, David Winsemius wrote: > > On Feb 13, 2010, at 10:09 AM, Martin Morgan wrote: > >> On 02/13/2010 06:21 AM, David Winsemius wrote: >>> >>> On Feb 13, 2010, at 3:18 AM, Sahil Seth wrote: >>> Hi, I have been trying to find a solution to this issue, but have not been

Re: [R] Using getSYMBOL, annotate package on a list with empty elements.

2010-02-13 Thread David Winsemius
On Feb 13, 2010, at 10:09 AM, Martin Morgan wrote: On 02/13/2010 06:21 AM, David Winsemius wrote: On Feb 13, 2010, at 3:18 AM, Sahil Seth wrote: Hi, I have been trying to find a solution to this issue, but have not been able to so ! I am trying to use sapply on the function getSYMBOL,

[R] Help for numbers close to 1 in R

2010-02-13 Thread cjmr
Hi all. I have a problem with adding 1 and very small numbers ex: >p=1e-49 >1+p [1] 1 My problem comes from some values of x for the value: 1-exp(-sum((x-1/sqrt(3))^2)) the return values are always equivalent. Please help Thanks -- View this message in context: http://n4.nabble.com/Help-

Re: [R] Using getSYMBOL, annotate package on a list with empty elements.

2010-02-13 Thread Martin Morgan
On 02/13/2010 06:21 AM, David Winsemius wrote: > > On Feb 13, 2010, at 3:18 AM, Sahil Seth wrote: > >> Hi, >> I have been trying to find a solution to this issue, but have not been >> able >> to so ! >> I am trying to use sapply on the function getSYMBOL, > > The annotate package is from BioCond

Re: [R] Failed install of package xlsReadWrite

2010-02-13 Thread Hans-Peter Suter
2010/2/11 : > Does anyone have a work-around for a failed installation of this package? >> library(xlsReadWrite) ... > xls.getshlib() > > However, the xls.getshlib() command fails with this error: (For the record) It probably was a corporate firewall problem. Apart from info on www.swissr.org (t

[R] Labels on a pyramide

2010-02-13 Thread Orvalho Augusto
I am using pyramid.plot() from the plotrix package. I have something like this xy.pop<-dados$masfr xx.pop<-dados$femfr #agelabels<-dados$femlab xycol<-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),11) xxcol<-color.gradient(c(1,1,0.5,1),c(0.5,0.

Re: [R] Using getSYMBOL, annotate package on a list with empty elements.

2010-02-13 Thread David Winsemius
On Feb 13, 2010, at 3:18 AM, Sahil Seth wrote: Hi, I have been trying to find a solution to this issue, but have not been able to so ! I am trying to use sapply on the function getSYMBOL, The annotate package is from BioConductor. an extract from the list is: test.goP[13:14] $`GO:0

Re: [R] "drop if missing" command?

2010-02-13 Thread David Winsemius
On Feb 12, 2010, at 6:48 PM, Nora Kozloff wrote: This will probably seem very simple to experienced R programmers: I am doing a snp association analysis and am at the model-fitting stage. I am using the Stats package's "drop1" with the following code: ##geno is the dataset ## the dependen

Re: [R] SAS and RODBC

2010-02-13 Thread Frank E Harrell Jr
Daniel Nordlund wrote: . . . This is just a quick follow-up to my previous post. Based on Prof. Ripley's response I went back and looked at the SAS log file and reread the RODBC help pages. The problem of writing a SAS dataset was solved by setting colQuote=NULL in the call to the odbcConn

Re: [R] help with EXPASY HTML form submission in RCurl package

2010-02-13 Thread Duncan Temple Lang
Sunando Roy wrote: > > Hi Duncan, > > Thanks for your help. I changed the P but the output that I get is not > what I expect. The form gets aborted without any actual output. I get > the same result with > > postForm("http://www.expasy.ch/tools/protscale.html";) That URL (...protscale.html)

Re: [R] Hierarchical data sets: which software to use?

2010-02-13 Thread Anton du Toit
Hi Douglas, Thanks for your helpful response. I've commented on some of the points you raised below: > Although this may not be helpful for your immediate goal, storing and manipulating data of this size and complexity (and, I expect, cost for collection) really calls for tools like relational da

[R] Using getSYMBOL, annotate package on a list with empty elements.

2010-02-13 Thread Sahil Seth
Hi, I have been trying to find a solution to this issue, but have not been able to so ! I am trying to use sapply on the function getSYMBOL, an extract from the list is: > test.goP[13:14] $`GO:050` IEA IEA IEA IEA TAS TAS TAS IEA "5270753" "5720725" "16