Re: [R] Strange Estimates from lmer and glmmPQL

2005-11-30 Thread Prof Brian Ripley
GEE models are very different from the subject-specific models fitted by glmmPQL: see the comparison in MASS. You are testing quite different hypotheses. You appear to be assuming that some things `appear not to work' because they do not give the same results as a different test. Suppose x we

Re: [R] values in between

2005-11-30 Thread Uwe Ligges
Eric C. Jennings wrote: > Hey there > > I have two vectors: > > y<- c(0.4, 0.0, 0.2, -0.2, -0.6, 0.2, 0.0, 0.0, 0.4, 0.4, 0.2) > > In the vector y, I want to access (in the order given) all of the values in > between each of the specific values of given. > > I understand subsetting with y[i

Re: [R] What are the possible Probabilstic models in R

2005-11-30 Thread Uwe Ligges
anil kumar rohilla wrote: > HI LIST i am a new R user,i am trying to make a model,which will > give me output in probability,which will take predictors and > predictand serie as input and and give me output in terms of > probability(e.g below normal,normal,above normal etc.).What is the > pac

Re: [R] about sorting table

2005-11-30 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: > hi all, > > I load a table with headers that enable me to acces it by the column names: > > tab<-read.table("blob/data.dat",h=T) > attach(tab) > > everythings are OK, but i try to sort this table against one of his column > like this: > > tab<-tab[order(tab$IndexUI)

Re: [R] cant get colAUC to plot

2005-11-30 Thread Uwe Ligges
tom wright wrote: > Can someone please explain why this wont plot. The cats example given > for the colAUC function will plot. Please report bugs in packages to the package maintainer rather than to R-help. Uwe Ligges > Many thanks again > tom > > # > library(caTool

Re: [R] help with R

2005-11-30 Thread Prof Brian Ripley
On Wed, 30 Nov 2005, Ed Wang wrote: > Berton, > > Firstly, thanks for your comments. > > To address the what you first said, plotting the 3690-element vector is what > is causing R to hang. Well, amongst the things you are not telling us are your OS and version of R and what commands you are usi

Re: [R] library(its) problem

2005-11-30 Thread Prof Brian Ripley
On Wed, 30 Nov 2005, Erin Hodgess wrote: > Dear R People: > > I wanted to use the package "its" this afternoon. > > I'm using R Version 2.2.0 for Windows. > > I was able to install the package, but ran into trouble at > the "library" command. Here is the output: > >> library(its) > Loading requir

[R] What are the possible Probabilstic models in R

2005-11-30 Thread anil kumar rohilla
HI LIST i am a new R user,i am trying to make a model,which will give me output in probability,which will take predictors and predictand serie as input and and give me output in terms of probability(e.g below normal,normal,above normal etc.).What is the package and what is the func

[R] values in between

2005-11-30 Thread Eric C. Jennings
Hey there I have two vectors: y<- c(0.4, 0.0, 0.2, -0.2, -0.6, 0.2, 0.0, 0.0, 0.4, 0.4, 0.2) In the vector y, I want to access (in the order given) all of the values in between each of the specific values of given. I understand subsetting with y[i], but how do I get to ssomewhere in between

Re: [R] Row wise function call.

2005-11-30 Thread Vasundhara Akkineni
Thanks, Peter and Henrik. Vasu. On 11/30/05, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > > Vasundhara Akkineni wrote: > > I have another issue.i have a function which calculates the log2(col i > > /col2) value, where i stands for columns 3,4,...etc. > > > > data<-read.table("table.txt", header

[R] Strange Estimates from lmer and glmmPQL

2005-11-30 Thread Rick Bilonick
I'm trying to fit a generalized mixed effects model to a data set where each subject has paired categorical responses y (so I'm trying to use a binomial logit link). There are about 183 observations and one explanatory factor x. I'm trying to fit something like: (lmer(y~x+(1|subject))) I also tri

Re: [R] Row wise function call.

2005-11-30 Thread Henrik Bengtsson
Vasundhara Akkineni wrote: > I have another issue.i have a function which calculates the log2(col i > /col2) value, where i stands for columns 3,4,...etc. > > data<-read.table("table.txt", header=TRUE) > > iratio<-function(x){ > for(n in 3:ncol(data)){ > z<-log2(data[x,n]/data[x,2]) > } > } > >

[R] Error in structural equation model - "The model has negative degrees of freedom"

2005-11-30 Thread Sunil W
Hi I am running a structural equation model with R using the sem command; am getting the following error: "Error in sem.default : The model has negative degrees of freedom = -4" My model is as follows: s_model = specify.model() x1->m1, b1,NA x2->m1, b2,NA x3->m2, b3,NA x4->m2, b4,NA x5->m2, b

Re: [R] fixed, random effects with variable weights

2005-11-30 Thread Spencer Graves
I don't have STATA and your example is not sufficiently complete for me to replicate anything. However, my approach to that kind of thing is to try to find the absolute simplest possible example I can think and work with that. I have on occasion programmed such simple examples in Ex

Re: [R] Solving Systems of Non-linear equations

2005-11-30 Thread Gabor Grothendieck
Just one addition to this. I noticed that its not really true that the output can be used in R verbatim since the C output uses pow instead of ^; however, if one replaces the "code c" statement with the statement "list export" then it is valid R. That is the input to mathomatic should be: mean =

[R] Row wise function call.

2005-11-30 Thread Vasundhara Akkineni
I have another issue.i have a function which calculates the log2(col i /col2) value, where i stands for columns 3,4,...etc. data<-read.table("table.txt", header=TRUE) iratio<-function(x){ for(n in 3:ncol(data)){ z<-log2(data[x,n]/data[x,2]) } } Where x- the row number of the data frame(data). i

[R] library(its) problem

2005-11-30 Thread Erin Hodgess
Dear R People: I wanted to use the package "its" this afternoon. I'm using R Version 2.2.0 for Windows. I was able to install the package, but ran into trouble at the "library" command. Here is the output: > library(its) Loading required package: Hmisc Hmisc library by Frank E Harrell Jr Type

[R] unexpected result from KalmanRun (KalmanLike, StructTS)

2005-11-30 Thread charles loboz
(re-formulate, re-send, without html) for vector y = c(1,2,3,4,5), H = 0.66 manual calculations using the equations below give a = c(1,1.66,2.55,3.51,4.50). KalmanRun with these parameters gives res$states = (1,1,1,1,1)! for Kalman Filter Durbin/Koopman give at p67 eqs 4.13: v =

Re: [R] calculating IRR (accounting) in R

2005-11-30 Thread Gabor Grothendieck
On 11/30/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > You can use uniroot: > > npv <- function(i, cf, tt = seq(along = cf)) sum(cf / (1-i)^tt) Sorry that should 1+i > npv0 <- npv(0.1, 1:10) > npv0 > f <- function(i, cf, npv0) npv0 - npv(i, cf) > uniroot(f, c(0.01, .99), cf = 1:10, npv0 = n

Re: [R] calculating IRR (accounting) in R

2005-11-30 Thread Gabor Grothendieck
You can use uniroot: npv <- function(i, cf, tt = seq(along = cf)) sum(cf / (1-i)^tt) npv0 <- npv(0.1, 1:10) npv0 f <- function(i, cf, npv0) npv0 - npv(i, cf) uniroot(f, c(0.01, .99), cf = 1:10, npv0 = npv0) On 11/30/05, paul sorenson <[EMAIL PROTECTED]> wrote: > I am trying to replace a spreadsh

Re: [R] likelihood ratio tests using glmmPQL

2005-11-30 Thread Douglas Bates
If you use lmer from the lme4 package (actually it is in the Matrix package but "logically" it is in the lme4 package) to fit a Generalized Linear Mixed Model you have the option of using PQL, or the Laplace approximation or Adaptive Gauss-Hermite Quadrature (AGQ). The log-likelihood for any of th

Re: [R] calculating IRR (accounting) in R

2005-11-30 Thread McGehee, Robert
Hello, If we define IRR implicitly such that NPV(C, IRR) = 0, then we can just write an IRR function that finds the zeros of the NPV function. Here are two such functions: NPV <- function(C, r) { sum(C / (1 + r) ^ (seq(along = C) - 1)) } IRR <- function(C) { uniroot(NPV, c(0, 1), C = C)$r

Re: [R] OT: Statistics question

2005-11-30 Thread bogdan romocea
What if the distributions are not normal etc? You might want to try a simulation to get an answer. Draw random samples from each distribution (without assuming normality etc - one way to do this is to get the quantiles, then draw a sample of quantiles, then draw a value from each quantile), throw t

Re: [R] date/time arithmetic

2005-11-30 Thread Gabor Grothendieck
On 11/30/05, Parlamis Franklin <[EMAIL PROTECTED]> wrote: > I agree there are workarounds (although reduction to secs is not > necessarily graceful when you want to add, say, "1 month" to a date, You can do that without difftime via: seq(x, len = 2, by = "month")[2] > or any other increment fo

Re: [R] date/time arithmetic

2005-11-30 Thread Parlamis Franklin
I agree there are workarounds (although reduction to secs is not necessarily graceful when you want to add, say, "1 month" to a date, or any other increment for which the total number of seconds is not fixed--and is also complicated by the existence of leap seconds). But upon inspection, t

[R] calculating IRR (accounting) in R

2005-11-30 Thread paul sorenson
I am trying to replace a spreadsheet model of a project justification with an R script. I can't seem to track down R functions to calculate Internal Rate of Return and NPV? Am I missing something? NPV doesn't seem so difficult to calculate (at least for a regular series) but I am struggling t

Re: [R] date/time arithmetic

2005-11-30 Thread Gabor Grothendieck
I don't know what is wrong but you could use the numeric class instead of the difftime class as a workaround: x <- Sys.time() y <- x + 3600 diffyx <- as.numeric(y) - as.numeric(x) identical(y - diffyx, x) # TRUE On 11/23/05, Parlamis Franklin <[EMAIL PROTECTED]> wrote: > On the help page "DateTim

Re: [R] date/time arithmetic

2005-11-30 Thread bogdan romocea
What do you need a bunch of functions for? I'm not familiar with the details of difftime objects, however an easy way out of here is to get the time difference in seconds, which you can then add or subtract as you please from date-times. x<-Sys.time(); y<-Sys.time()+3600 diff <- as.numeric(difftim

Re: [R] date/time arithmetic

2005-11-30 Thread Parlamis Franklin
Hi. Sorry to pester, but I didn't get a reply to this (perhaps owing to Thanksgiving break). This seems to be a case where the R language simply doesn't do what it says it does (i.e., allow addition or subtraction of a difftime object and a date-time object). Am I wrong? I am about to wri

Re: [R] Where ca I find the hcass2 Fortran code

2005-11-30 Thread Duncan Murdoch
On 11/30/2005 12:27 PM, David Ruau wrote: > Hi everybody, > > I am using R 2.2.0 under OS X 10.3.9. > And I am working on the "hclust" function from the package STATS. > Inside I found a call to a Fortran program hclust.f that I was able to > find into the source distribution of R, but there is

Re: [R] Corrupted workspace(?)

2005-11-30 Thread Duncan Murdoch
On 11/30/2005 12:00 PM, giovanna jona lasinio wrote: > Dear R helpers, > I'm using R2.2 under windows XP professional on a Dell double processor > workstation. > I have a large (29Mb) workspace that I'm trying to load both, by double > clicking and by direct load. The message I get is "Bad restore

Re: [R] strange plots with type = "h" option

2005-11-30 Thread Owen, Jason
Thanks a lot! I wonder why that isn't the default > -Original Message- > From: Berton Gunter [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 30, 2005 1:14 PM > To: Owen, Jason; r-help@stat.math.ethz.ch > Subject: RE: [R] strange plots with type = "h" option > > ?par "lend"

Re: [R] qcc

2005-11-30 Thread Leif Kirschenbaum
If you examine the code for the function "violating.runs" in the qcc package (try "violating.runs") you can deconstruct it to find that the code flags runs where there are .qcc.options$run.length or more points in a row on one side of the center (process mean). However, the class

[R] cant get colAUC to plot

2005-11-30 Thread tom wright
Can someone please explain why this wont plot. The cats example given for the colAUC function will plot. Many thanks again tom # library(caTools) a<-rnorm(100) b<-rbinom(100,1,0.7) colAUC(a,b,plotROC=TRUE) > colAUC(a,b,plotROC=TRUE) Error in strwidth(legend, units = "user

Re: [R] strange plots with type = "h" option

2005-11-30 Thread Gregory Snow
Look at ?par specifically at the 'lend' argument. You probably want to do: par(lend=1) Before doing your plot. -- Gregory L. Snow Ph.D. Statistical Data Center, IHC [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Beha

Re: [R] strange plots with type = "h" option

2005-11-30 Thread Berton Gunter
?par "lend" Before plotting: par(lend='square') -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA "The business of the statistician is to catalyze the scientific learning process." - George E. P. Box > -Original Message- > From: [EMAIL PROTECTED] > [mailt

Re: [R] Solution to non-linear equation problem

2005-11-30 Thread Spencer Graves
RSiteSearch("solving nonlinear equations") just returned 42 hits for me, many of them potentially relevant to your question. And there are more capabilities than what I found listed in the first few responses, including nlme in addition to optim, nls, etc. A more focused question as

Re: [R] newton-raphson

2005-11-30 Thread Martin Maechler
> "dlavecchia" == dlavecchia <[EMAIL PROTECTED]> > on Wed, 30 Nov 2005 17:08:47 +0100 writes: dlavecchia> I have to solve a score function by using dlavecchia> Newton-Raphson algorithm. Is there such a dlavecchia> fucntion in R? I have built this algoritm dlavecchia>

[R] about sorting table

2005-11-30 Thread [EMAIL PROTECTED]
hi all, I load a table with headers that enable me to acces it by the column names: tab<-read.table("blob/data.dat",h=T) attach(tab) everythings are OK, but i try to sort this table against one of his column like this: tab<-tab[order(tab$IndexUI),]; It is still ok, the table is sorted, if i t

[R] Where ca I find the hcass2 Fortran code

2005-11-30 Thread David Ruau
Hi everybody, I am using R 2.2.0 under OS X 10.3.9. And I am working on the "hclust" function from the package STATS. Inside I found a call to a Fortran program hclust.f that I was able to find into the source distribution of R, but there is a also a call to a Fortran program hcass2. This very

Re: [R] OT: Statistics question

2005-11-30 Thread Peter Dalgaard
tom wright <[EMAIL PROTECTED]> writes: > I apologise for asking this question here but I am hoping that someone > can either give me direct guidance and/or point me to a better group for > this type of disucssion. > > I have what I feel should be a fairly simple problem but which my > limited sta

Re: [R] overlay additional axes

2005-11-30 Thread Martin Maechler
> "Dylan" == Dylan Beaudette <[EMAIL PROTECTED]> > on Mon, 28 Nov 2005 13:56:27 -0800 writes: Dylan> Greetings, Dylan> I am trying to add an extra labled axis in position 3 (top x-axis), with Dylan> numbers that do not match up with the existing axes. Dylan> Surely t

[R] strange plots with type = "h" option

2005-11-30 Thread Owen, Jason
Hello, With the new version 2.2.0, I get strange plots when using the histogram-like option in plot(). For example, a plot of binomial probabilities: > plot(0:10,dbinom(0:10,10,.1), type = "h", lwd = 30) gives me weird fat cirular bars, with mass out at values with low probability. What is th

[R] Solution to non-linear equation problem

2005-11-30 Thread Scott Story
Thanks to Gabor, Duncan, and Peter. I knew the answer had something to do with solving for a and b in terms of mean and variance. I will build a function using the equations you provided Duncan and will look into using Mathomatic in the future Gabor. Appreciate the help. Peter, this wa

Re: [R] R software on 64bit - Intel Xeon processor

2005-11-30 Thread Martyn Plummer
Many packages in Fedora Extras, including R, have been recompiled for CentOS (a RHEL clone). You can find them here: http://centos.karan.org/ They should be compatible with RHEL, but of course your mileage may vary. Martyn On Tue, 2005-11-29 at 20:43 +, Prof Brian Ripley wrote: > You don't

[R] Corrupted workspace(?)

2005-11-30 Thread giovanna jona lasinio
Dear R helpers, I'm using R2.2 under windows XP professional on a Dell double processor workstation. I have a large (29Mb) workspace that I'm trying to load both, by double clicking and by direct load. The message I get is "Bad restore file magic number (file may be corrupted)...". I believe that

[R] help with R

2005-11-30 Thread Ed Wang
Berton, Firstly, thanks for your comments. To address the what you first said, plotting the 3690-element vector is what is causing R to hang. Rather than lose everything I've entered by hand each interactive run I've switched to using a batch script, which I can now load and run at prompt. Usin

Re: [R] Solving Systems of Non-linear equations

2005-11-30 Thread Gabor Grothendieck
Sorry I seemed to have messed up the copying and pasting. Here it is again. --- Go to http://mathomatic.orgserve.de/math/ and install mathomatic (its free) or just connect to the online server and do this. The C output, i.e the result of the two code c commands, can be used verbatim in R. Note

Re: [R] Permutation tests for correlations

2005-11-30 Thread Achim Zeileis
On Wed, 30 Nov 2005, Peter Dalgaard wrote: > Apropos the question about permutation tests in multiple regression: > > We do have perm.test in package ExactRankTests, but it does one- and just for the record: exactRankTests. > two-sample tests, as in t.test, wilcox.test, etc. There doesn't seem >

Re: [R] Coefficient of Variance (log values) !

2005-11-30 Thread Peter Dalgaard
Sharon Anbu <[EMAIL PROTECTED]> writes: > Hi, > > I am calculating coefficient of variance (CV) for my ELISA's data. For > normal values, I use the standard formula CV = SD/Mean * 100. Now, I > would like to calculate CV for log values. Can any one please > suggest me, how I can do this in R?

Re: [R] Solving Systems of Non-linear equations

2005-11-30 Thread Gabor Grothendieck
Go to http://mathomatic.orgserve.de/math/ and install mathomatic (its free) or just connect to the online server and do this. The C output, i.e the result of the two code c commands, can be used verbatim in R. Note that mathomatic does not support logs but for simply problems like this its very u

[R] help with ks.test

2005-11-30 Thread Emanuele Mazzola
Hello everybody, after consulting V.Ricci's paper ("Rappresentazione analitica delle distribuzioni statistiche con R" / Analytical representation of statistical distributions in R) i would like to ask you further advice and a confirmation about ks.test. My willing is to perform ks.test to evalu

[R] newton-raphson

2005-11-30 Thread dlavecchia
Hi everybody, I have to solve a score function by using Newton-Raphson algorithm. Is there such a fucntion in R? I have built this algoritm newton<-function(tgt,drva,th0,err) { iter=0 repeat {iter = iter+1 th1=th0-tgt(th0)/drva(th0) if (abs(th0-th1)http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/

Re: [R] Solving Systems of Non-linear equations

2005-11-30 Thread Duncan Murdoch
On 11/30/2005 10:14 AM, Scott Story wrote: > I am trying to write a function that will solve a simple system of > nonlinear equations for the parameters that describe the beta > distribution (a,b) given the mean and variance. > > > mean = a/(a+b) > variance = (a*b)/(((a+b)^2) * (a+b+1)) > > An

Re: [R] Solving Systems of Non-linear equations

2005-11-30 Thread Peter Dalgaard
Scott Story <[EMAIL PROTECTED]> writes: > I am trying to write a function that will solve a simple system of > nonlinear equations for the parameters that describe the beta > distribution (a,b) given the mean and variance. > > > mean = a/(a+b) > variance = (a*b)/(((a+b)^2) * (a+b+1)) > > Any

Re: [R] Games-Howell, Gabriel, Hochberg

2005-11-30 Thread Gabor Grothendieck
Another possibility might be to have a CRAN Task View devoted to tests. The whole area is quite confusing and it would be nice to have a central point for guidance. On 30 Nov 2005 16:55:13 +0100, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck <[EMAIL PROTECTED]> writes: > > > What

[R] OT: Statistics question

2005-11-30 Thread tom wright
I apologise for asking this question here but I am hoping that someone can either give me direct guidance and/or point me to a better group for this type of disucssion. I have what I feel should be a fairly simple problem but which my limited stats knowledge can't answer. I have two overlapping di

Re: [R] Games-Howell, Gabriel, Hochberg

2005-11-30 Thread Peter Dalgaard
Gabor Grothendieck <[EMAIL PROTECTED]> writes: > What would be nice would be an R routine that automatically > implements this flowchart. I'd recommend learning about p.adjust and the multcomp package *instead* of following the flowchart. (Ignoring heteroscedasticity seems a bit silly too, given

Re: [R] Games-Howell, Gabriel, Hochberg

2005-11-30 Thread Gabor Grothendieck
One could have a method= argument with the default chosen by using the flowchart and the output including information on which method was used. A good help page and/or vignette (that included the flowchart) could help ameliorate difficulties. That would still allow the user to specify a particula

Re: [R] Games-Howell, Gabriel, Hochberg

2005-11-30 Thread Claus Atzenbeck
On Wed, 30 Nov 2005, Gabor Grothendieck wrote: > What would be nice would be an R routine that automatically > implements this flowchart. This overview is just for my personal usage. I am not a statistician, but some others told me that there is a lot of experience behind choosing the right test.

[R] Permutation tests for correlations

2005-11-30 Thread Peter Dalgaard
Apropos the question about permutation tests in multiple regression: We do have perm.test in package ExactRankTests, but it does one- and two-sample tests, as in t.test, wilcox.test, etc. There doesn't seem to be an exact version of the permutation test for correlations, i.e., the one that could b

[R] Coefficient of Variance (log values) !

2005-11-30 Thread Sharon Anbu
Hi, I am calculating coefficient of variance (CV) for my ELISA's data. For normal values, I use the standard formula CV = SD/Mean * 100. Now, I would like to calculate CV for log values. Can any one please suggest me, how I can do this in R? Thanks in Advance. Regards, Sharon ___

[R] Loop within nlme

2005-11-30 Thread Scott Story
I am trying to mimic the SAS code below in R. The trick is that each row in the dataset has variable "t" which controls how many times the do-loop below will be iterated (that is, the model is fit to the response, ifate, 0 to t-1 times for each row of data). Is it possible to incorporat

Re: [R] nicer matrix construction: rbind()

2005-11-30 Thread Gabor Grothendieck
On 11/30/05, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Wed, 30 Nov 2005, Martin Maechler wrote: > > > Just a small remark on "R coding style" : > > > >> "Sean" == Sean Davis <[EMAIL PROTECTED]> > >> on Tue, 29 Nov 2005 08:34:39 -0500 writes: > > > > Sean> <> > >

[R] Solving Systems of Non-linear equations

2005-11-30 Thread Scott Story
I am trying to write a function that will solve a simple system of nonlinear equations for the parameters that describe the beta distribution (a,b) given the mean and variance. mean = a/(a+b) variance = (a*b)/(((a+b)^2) * (a+b+1)) Any help as to where to start would be welcome. -- Scott St

Re: [R] Games-Howell, Gabriel, Hochberg

2005-11-30 Thread Gabor Grothendieck
What would be nice would be an R routine that automatically implements this flowchart. On 11/30/05, Claus Atzenbeck <[EMAIL PROTECTED]> wrote: > On Tue, 29 Nov 2005, Claus Atzenbeck wrote: > > > How do you calculate post hoc multiple comparisons tests with R for > > normal distributed samples with

Re: [R] about kidpack package

2005-11-30 Thread Prof Brian Ripley
On Wed, 30 Nov 2005, Uwe Ligges wrote: > August Berg wrote: > >>> library(kidpack) >> >> Error in library(kidpack) : 'kidpack' is not a valid package -- installed < >> 2.0.0? >> >> On 11/30/05, August Berg <[EMAIL PROTECTED]> wrote: >> >>> * I have both R and Biobase and also download kidpack_1.1.

Re: [R] Looking for constrained optimisation code

2005-11-30 Thread Hong Ooi
___ Ah! I didn't notice this until now. Yes, following Nocedal & Wright (excellent book, that) I've defined a quadratic penalty function to enforce an equality constraint, and added it to the objective. (Origina

Re: [R] permutation test for linear models with continuous covariates

2005-11-30 Thread Peter Dalgaard
"anders superanders" <[EMAIL PROTECTED]> writes: > Hi I was wondering if there is a permutation test available in R for linear > models with continuous dependent covariates. I want to do a test like the > one shown here. > > bmi<-rnorm(100,25) > x<-c(rep(0,75),rep(1,25)) > y<-rnorm(100)+bmi^(1/

Re: [R] Random Effects for One-Way Anova

2005-11-30 Thread Christian Hennig
On Wed, 30 Nov 2005, [EMAIL PROTECTED] wrote: > I'm sorry if I wasn't clear > There are repeated measures for each level of my factor. > For instance, the dataframe could look like that: > > A B > 12.0 1 > 12.3 1 > 15 1 > 12.9 2 > 16.7 2 > 15.4 2 > 23.5 3 > 9.6 3 > 7.8 3 > > In order to fit a

Re: [R] Row-wise data retrieval

2005-11-30 Thread Vasundhara Akkineni
Thanks, Henrik. Vasu. On 11/29/05, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > > Vasundhara Akkineni wrote: > > I want to retrieve data row wise from a data frame. My data frame is as > > below: > > > > data<-read.table("table.txt", header=TRUE) > > > > how can i get row-wise data? > > Example

Re: [R] Games-Howell, Gabriel, Hochberg

2005-11-30 Thread Claus Atzenbeck
On Tue, 29 Nov 2005, Claus Atzenbeck wrote: > How do you calculate post hoc multiple comparisons tests with R for > normal distributed samples with different variances? In order to make it more visible, I have created an overview that shows my decision about what test I use. It is available at

Re: [R] Random Effects for One-Way Anova

2005-11-30 Thread Prof Brian Ripley
On Wed, 30 Nov 2005, Peter Dalgaard wrote: > Prof Brian Ripley <[EMAIL PROTECTED]> writes: > >>> My questions is: >>> which formula should I use if I want to use a random effects model? >>> I think I should use "lme", but I don't know how. >> >> aov() is the function for anova modelling. so you wa

Re: [R] Random Effects for One-Way Anova

2005-11-30 Thread Peter Dalgaard
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > > My questions is: > > which formula should I use if I want to use a random effects model? > > I think I should use "lme", but I don't know how. > > aov() is the function for anova modelling. so you want > > aov(A ~ B, data = DATA) # fixed

Re: [R] about kidpack package

2005-11-30 Thread Uwe Ligges
August Berg wrote: >>library(kidpack) > > Error in library(kidpack) : 'kidpack' is not a valid package -- installed < > 2.0.0? > > On 11/30/05, August Berg <[EMAIL PROTECTED]> wrote: > >>* I have both R and Biobase and also download kidpack_1.1.1.tar.gz. >>After I unzip the gz file, I got the f

Re: [R] Addon packages

2005-11-30 Thread Kåre Edvardsen
Thanx! KÃ¥re On Wed, 2005-11-30 at 13:27 +0100, Roger Bivand wrote: > On Wed, 30 Nov 2005, KÃ¥re Edvardsen wrote: > > > I'm trying to add 'gplots' from install.packages("gplots", lib = > > "/usr/lib/R/library", dependencies = TRUE) on a linux host, but R does > > not seem to figure out there's

[R] perp() and axes

2005-11-30 Thread Andreas Lehnert
Hello R-sters Is there a way to force e.g. the y-axis of a persp()-plot to show not equaly spaced labels but the ones you can give in the "y="-command? I tried persp(,y=c(0.1,0.5,0.7,1),...) but the labels were 0.0:1 by 0.2 I'm looking forward to your help Andy --

Re: [R] about kidpack package

2005-11-30 Thread August Berg
> library(kidpack) Error in library(kidpack) : 'kidpack' is not a valid package -- installed < 2.0.0? On 11/30/05, August Berg <[EMAIL PROTECTED]> wrote: > > * I have both R and Biobase and also download kidpack_1.1.1.tar.gz. > After I unzip the gz file, I got the folders and files. Then i got > l

[R] nls and weighting

2005-11-30 Thread Joerg van den Hoff
I posted this a week ago on r-devel but to no avail and hope this not considered cross-posting: ===cut=== hi everybody, which each release I hope that the section "weights: an optional numeric vector of (fixed) weights. When present,

Re: [R] Addon packages

2005-11-30 Thread Roger Bivand
On Wed, 30 Nov 2005, Kåre Edvardsen wrote: > I'm trying to add 'gplots' from install.packages("gplots", lib = > "/usr/lib/R/library", dependencies = TRUE) on a linux host, but R does > not seem to figure out there's a new package installed (yes, I've > restarted the R-session). I've tried the defa

[R] R: scale and location - "t distr"

2005-11-30 Thread Clark Allan
hi all HOPE SOMEONE CAN HELP! i 've been searching r and some of the archives in order to find out how one can consistently estimate the degrees of freedom of the following random variable: Y = a*T(v)+b a and b = constants T(v) is a Students t distribution with v degrees

Re: [R] saving AIC of intermediate models in step

2005-11-30 Thread Adaikalavan Ramasamy
df <- data.frame( matrix( rnorm(1000), nc=10 ) ) colnames(df) <- c("y", paste("x", 1:9, sep="")) ifit <- glm( y ~ ., data=df ) # initial fit a <- stepAIC( ifit, keep=extractAIC ) a$keep [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 10.000 9. 8.0

[R] Addon packages

2005-11-30 Thread Kåre Edvardsen
I'm trying to add 'gplots' from install.packages("gplots", lib = "/usr/lib/R/library", dependencies = TRUE) on a linux host, but R does not seem to figure out there's a new package installed (yes, I've restarted the R-session). I've tried the default, and different library folders, without success.

Re: [R] Random Effects for One-Way Anova

2005-11-30 Thread Doran, Harold
Giuseppe GIven the information below it is difficult to provide help. But, you might use the lmer() function in the Matrix package in a fashion such as lmer(A ~ B +(1|ID), data) where ID is a grouping variable. There are plently of papers on lme and lmer in the R news as well as a book by Pinh

Re: [R] Random Effects for One-Way Anova

2005-11-30 Thread Prof Brian Ripley
On Wed, 30 Nov 2005 [EMAIL PROTECTED] wrote: > Hello to All. > I'd want to use a one-way ANOVA. This means that I have only one factor, with, > lets say, 5 levels. > I made a dataframe, called "DATA", with two Columns: > A, that is my response, and it is "class numerical". There is no class 'nume

Re: [R] Random Effects for One-Way Anova

2005-11-30 Thread Giuseppe . Palermo
I'm sorry if I wasn't clear There are repeated measures for each level of my factor. For instance, the dataframe could look like that: A B 12.0 1 12.3 1 15 1 12.9 2 16.7 2 15.4 2 23.5 3 9.6 3 7.8 3 In order to fit a random effects, is right to apply: lme(A~1,data=DATA,random=~1|B)? Giuse

Re: [R] glmmPQL

2005-11-30 Thread Spencer Graves
1. Did you try "anova(f1)"? The documentation for "glmmPQL" says it produces an object of class lme, and "anova.glm" might not work properly for it. Also, did you try "summary(f1)", as suggested in the example in "?glmmPQL"? 2. Have you considered using "lmer" in the "lm

[R] permutation test for linear models with continuous covariates

2005-11-30 Thread anders superanders
Hi I was wondering if there is a permutation test available in R for linear models with continuous dependent covariates. I want to do a test like the one shown here. bmi<-rnorm(100,25) x<-c(rep(0,75),rep(1,25)) y<-rnorm(100)+bmi^(1/2)+rnorm(100,2)*x+bmi*x H0<-lm(y~1+x+bmi) H1<-lm(y~1+x+bmi+x*bm

Re: [R] help with R

2005-11-30 Thread Florence Combes
> > I've tried loading the batch script via the command > > >source(C:\\Program Files\\R\\rw2011\\HO_Rscript.txt) > > in interactive mode but I get an error. > > Question 2: can someone point out the syntax flaw in trying > to upload this batch script text file? try > source("C:/Program Files/R/r

[R] SciViews-R_0.8-9 Console problem

2005-11-30 Thread Henrik Parn
Dear R users, I successfully installed SciViews the other day. However, when I try to run it now, the command/script window does not appear. Strange. Well, actually I see a tendency to a script window (in the lower part of the sciview window where it is suppose to be) during start up, but when

[R] Random Effects for One-Way Anova

2005-11-30 Thread Giuseppe . Palermo
Hello to All. I'd want to use a one-way ANOVA. This means that I have only one factor, with, lets say, 5 levels. I made a dataframe, called "DATA", with two Columns: A, that is my response, and it is "class numerical". B, that defines the different levels of my factor, and it is "class factor". If

Re: [R] nicer matrix construction: rbind()

2005-11-30 Thread Prof Brian Ripley
On Wed, 30 Nov 2005, Martin Maechler wrote: > Just a small remark on "R coding style" : > >> "Sean" == Sean Davis <[EMAIL PROTECTED]> >> on Tue, 29 Nov 2005 08:34:39 -0500 writes: > > Sean> <> > > Sean> x <- matrix(c(1,1,1,2,2,2,1,1,1,1,1,2),nr=2,byrow=TRUE) > >

[R] nicer matrix construction: rbind()

2005-11-30 Thread Martin Maechler
Just a small remark on "R coding style" : > "Sean" == Sean Davis <[EMAIL PROTECTED]> > on Tue, 29 Nov 2005 08:34:39 -0500 writes: Sean> <> Sean> x <- matrix(c(1,1,1,2,2,2,1,1,1,1,1,2),nr=2,byrow=TRUE) Sean> <.> (a very helpful answer to

[R] about kidpack package

2005-11-30 Thread August Berg
* I have both R and Biobase and also download kidpack_1.1.1.tar.gz. After I unzip the gz file, I got the folders and files. Then i got lost: how to install the package of kidpack(because there is no zipped file after I uninstall kidpack_1.1.1.tar.gz)? If I choose install from local zipped file, kid

[R] likelihood ratio tests using glmmPQL

2005-11-30 Thread Elizabeth Boakes
I am analysing some binary data with a mixed effects model using glmmPQL. I am aware that I cannot use the AIC values to help me find the minimum adequate model so how do I perform likelihood ratio tests? I need to fix on the minimum adequate model but I'm not sure of the proper way to do this