Re: [R] Behavior of ordered factors in glm

2008-01-05 Thread Prof Brian Ripley
Further to Duncan's comments, you can control factor codings via options(contrasts=), by setting contrasts() on the factor and via C(). This does enable you to code an ordered factor as a linear term, for example. The only place I know that this is discussed in any detail is in Bill Venables' a

Re: [R] Error: missing value where TRUE/FALSE needed

2008-01-05 Thread Benilton Carvalho
errata: fcsPar[k+1] On Jan 6, 2008, at 1:50 AM, Benilton Carvalho wrote: make "k = 100", note that you're doing fcsPar[k]-fcsPar[k+10] note fcsPar has length 100... therefore valueDiff becomes NA.. and the if() statement fails. b On Jan 6, 2008, at 1:16 AM, Nicholas Crosbie wrote: Can a

Re: [R] Error: missing value where TRUE/FALSE needed

2008-01-05 Thread Benilton Carvalho
make "k = 100", note that you're doing fcsPar[k]-fcsPar[k+10] note fcsPar has length 100... therefore valueDiff becomes NA.. and the if() statement fails. b On Jan 6, 2008, at 1:16 AM, Nicholas Crosbie wrote: Can any explain the following error: Error in if ((seedCount <= seedNumber) && (

[R] Error .. missing value where TRUE/FALSE needed

2008-01-05 Thread Nicholas Crosbie
Can any explain the following error: Error in if ((seedCount <= seedNumber) && (valueDiff > sup)) { : missing value where TRUE/FALSE needed which I get upon running this script: seedNumber <- 10 seeds <- array(dim = seedNumber) seedCount <- 1 maxValue <- 100 sup <- maxValue / 2 fcsPar <- a

[R] Error: missing value where TRUE/FALSE needed

2008-01-05 Thread Nicholas Crosbie
Can any explain the following error: Error in if ((seedCount <= seedNumber) && (valueDiff > sup)) { : missing value where TRUE/FALSE needed which I get upon running this script: seedNumber <- 10 seeds <- array(dim = seedNumber) seedCount <- 1 maxValue <- 100 sup <- maxValue / 2 fcsPar <-

Re: [R] Announce: Contributed Documentation

2008-01-05 Thread diegol
Dear Prof. Vincent Goulet, Vincent Goulet wrote: > > If there is any interest, I might prepare an English version of > the document. > Maybe a little little late, but if by chance you happened to create the English version of the document, I would also be interested in reading it. Thank you

Re: [R] Behavior of ordered factors in glm

2008-01-05 Thread Duncan Murdoch
On 05/01/2008 7:16 PM, David Winsemius wrote: > David Winsemius <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> I have a variable which is roughly age categories in decades. In the >> original data, it came in coded: >>> str(xxx) >> 'data.frame': 58271 obs. of 29 variables: >> $ i

Re: [R] Confidence Inteval for regression curve.

2008-01-05 Thread hadley wickham
On Jan 5, 2008 7:45 PM, Milton Cezar Ribeiro <[EMAIL PROTECTED]> wrote: > Dear all, > > I have a dataset which I need to estimate the regression model and plot the > estimated curve two other curves with low and high confidence interval > (CI=95%). How can I do that? The easiest way is to use th

[R] Confidence Inteval for regression curve.

2008-01-05 Thread Milton Cezar Ribeiro
Dear all, I have a dataset which I need to estimate the regression model and plot the estimated curve two other curves with low and high confidence interval (CI=95%). How can I do that? x<-1:100 y<-x^0.2+rnorm(100,0.1,0.1) mod<-glm(y~log(x)) plot(y~x) lines(predict(mod)~x,col=2) Kind regards,

[R] SVD least squares sub-space projection

2008-01-05 Thread José Augusto M. de Andrade Junior
Hi all, A good new year for everybody. Could somebody help me on a question? The Singular Value Decomposition of a matrix A gives A = U * D * t(V) I A is a M X N matrix, U is the left singular matrix (M X N), D is a diagonal singular values matrix (N X N) and V is the transpose right singular

Re: [R] Behavior of ordered factors in glm

2008-01-05 Thread David Winsemius
David Winsemius <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I have a variable which is roughly age categories in decades. In the > original data, it came in coded: >> str(xxx) > 'data.frame': 58271 obs. of 29 variables: > $ issuecat : Factor w/ 5 levels "0 - 39","40 - 49",..: 1 1

[R] Behavior of ordered factors in glm

2008-01-05 Thread David Winsemius
I have a variable which is roughly age categories in decades. In the original data, it came in coded: > str(xxx) 'data.frame': 58271 obs. of 29 variables: $ issuecat : Factor w/ 5 levels "0 - 39","40 - 49",..: 1 1 1 1... snip I then defined issuecat as ordered: > xxx$issuecat<-as.ordered(x

Re: [R] Ecological Detective worked solutions [R-wiki]

2008-01-05 Thread Fernando Mayer
This is really great. It will be very usefull. Thanks for that! Fernando Mayer. On Jan 5, 2008 12:10 PM, Tyler Smith <[EMAIL PROTECTED]> wrote: > Hi, > > I've added several pages of worked solutions for the book Ecological > Detective by Hilborn and Mangel to the R-wiki. My hope is that this > wi

Re: [R] I need arguments pro-S-PLUS and against SAS...

2008-01-05 Thread John Kane
You might want to descibe what uses you expect to have for SAS and/or R. It might make it easier for people to make specific recommendations. Personally I like the graphics, ease of writing functions, and general ease of data manipulation. --- Alberto Monteiro <[EMAIL PROTECTED]> wrote: > I nee

Re: [R] glm for nominal X ordinal

2008-01-05 Thread David Winsemius
Gang Chen <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Suppose I have a two-way table of nominal category (party > affiliation) X ordinal category (political ideology): > > party affiliation X (3 levels) - democratic, independent, and > republic > political ideology Y (3 levels) - l

Re: [R] AUC values from LRM and ROCR

2008-01-05 Thread Frank E Harrell Jr
Colin Robertson wrote: > Dear List, > > > > I am trying to assess the prediction accuracy of an ordinal model fit with > LRM in the Design package. I used predict.lrm to predict on an independent > dataset and am now attempting to assess the accuracy of these predictions. >>From what I have rea

[R] Ecological Detective worked solutions [R-wiki]

2008-01-05 Thread Tyler Smith
Hi, I've added several pages of worked solutions for the book Ecological Detective by Hilborn and Mangel to the R-wiki. My hope is that this will be of use to others working through this book without access to a local expert. I am certainly not an expert, local or otherwise. I have posted soluti

Re: [R] Likelihood ratio test for proportional odds logistic regression

2008-01-05 Thread Prof Brian Ripley
On Sat, 5 Jan 2008, xinyi lin wrote: > Hi, > > I want to do a global likelihood ratio test for the proportional odds > logistic regression model and am unsure how to go about it. I am using > the polr() function in library(MASS). > > 1. Is the p-value from the likelihood ratio test obtained by > a

Re: [R] R2WinBUGS sending variables as factors

2008-01-05 Thread Gregor Gorjanc
csiro.au> writes: ... > 1) I can't seem to send variables classed as factors (Month), is there a > way do this? You can not use factors per se in BUGS. You have to convert them to numeric (integer) variables before. > 2) Checking the Log in WinBUGS I can see that the model is Syntactically > co

[R] Likelihood ratio test for proportional odds logistic regression

2008-01-05 Thread xinyi lin
Hi, I want to do a global likelihood ratio test for the proportional odds logistic regression model and am unsure how to go about it. I am using the polr() function in library(MASS). 1. Is the p-value from the likelihood ratio test obtained by anova(fit1,fit2), where fit1 is the polr model with o

Re: [R] mfrow for levelplot?

2008-01-05 Thread Sundar Dorai-Raj
marcg said the following on 1/5/2008 3:48 AM: > hello > > could anyone tell my, why I do not suceed with mfrow? > > par(mfrow=c(4,4)) > > for (i in 5:17){ > levelplot(maxwater[,i]~maxwater$V1*maxwater$V2, col.regions=whiteblue(5), > xlab="", cuts=4) > } > > Thanks > > Marc > -- >

Re: [R] Plotting labeled impulses: label collision

2008-01-05 Thread Jim Lemon
Johannes Graumann wrote: > Dear all, > > As you can see from the attachment I'm using R to automatically annotate > peptide fragmentation mass spectra, which are represented by impulse plots. > I'd like to poll you on approaches of how to deal as generally as possible > with the two biggest annota

[R] mfrow for levelplot?

2008-01-05 Thread marcg
hello could anyone tell my, why I do not suceed with mfrow? par(mfrow=c(4,4)) for (i in 5:17){ levelplot(maxwater[,i]~maxwater$V1*maxwater$V2, col.regions=whiteblue(5), xlab="", cuts=4) } Thanks Marc -- __ R-help@r-project.org mailing list

Re: [R] GLMMs fitted with lmer (R) & glimmix (SAS)

2008-01-05 Thread Andrea Previtali
Sorry, I realized that somehow the message got truncated. Here is the remaining part of the SAS output: Solutions for Fixed Effects: Effect DIST DW ELI SEX SEAS Estimate Std. Error DF t Value Pr > |t| Intercept