Re: [R] Error: cannot use PQL when using lmer

2008-07-05 Thread hpdutra
In fact I am using Crawley example to fit my data. I am running a lmer analysis for binary longitudinal (repeated measures) data. Basically, I have 12 plots, divided in 3 blocks, each block contain 4 plots. Plots were manipulate for fruits (F) and vegetation (V) that were either intact(I) or re

Re: [R] interpreting mixed model anova results

2008-07-05 Thread hpdutra
Sounds like a repeated measures design, if so then you have to incorporate this into your model before interpreting the results. Brooke LaFlamme-2 wrote: > > Hi, I am trying to do a repeated measures ANOVA to determine if there is a > significant difference between two sets of timecourse data.

[R] Different Autocorrelation using R and other softwares

2008-07-05 Thread Yinny
Dear All, Would like to ask the inconsistency in the autocorrelation from R with SPSS/Minitab. I have tried a dataset x with 20 data (1-20) and ask R to give the autocorrelation of different lags using the command < acf(x, lag.max=100, type = "correlation"), However while SPSS and Minitab give t

Re: [R] trying to superimpose a line plot onto a histogram

2008-07-05 Thread Edwin Lei
I tried that, but for some reason the scale is wrong? So the density doesn't show up on the histogram. Also, I'd prefer not to use the density because I don't want the line plot to begin at a value of 0. I'm trying to emulate an exponential decay. Thanks for the help. > -Original Message-

[R] lattice question

2008-07-05 Thread markleeds
I'm creating a lattice barchart based off a pretty complicated data structure. The barchart comes out quite nice ( thanks to lattice ) but the problem is that the horizontal axis comes out all scrunched because the barchart doesn't know that the intervals of Var.1 are really "associated" with th

Re: [R] help about random generation of a Normal distribution ofseveral variables

2008-07-05 Thread Bill.Venables
What's the problem with loading the MASS library??? The MASS library is one of the recommended packages, so should be universally available. Pinching code like this and freezing it inside your personal scripts means that if ever we find bug fixes or improvements you miss out on them. Bill

Re: [R] help about random generation of a Normal distribution ofseveral variables

2008-07-05 Thread Bill.Venables
> library(MASS) > set.seed(22134) > Y <- mvrnorm(100, mu = c(0,1), Sigma = matrix(c(2,1,1,3),2,2)) > colMeans(Y) [1] 0.06461359 1.08436419 > var(Y) [,1] [,2] [1,] 1.683963 1.300363 [2,] 1.300363 3.280612 > Bill Venables CSIRO Laboratories PO Box 120, Cleveland, 4163 AUSTRALIA Office

Re: [R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Peng Jiang
Hi , Arnau Did you ever check your mailbox? your question was answered last night Beijing time. :) Just read the following . - There is no need to load the MASS library, since the code for mvrnorm therein is compact and self-contained: mvrnorm <- function (n=1, mu, Si

Re: [R] trying to superimpose a line plot onto a histogram

2008-07-05 Thread Edwin Lei
Thanks for the quick response. But the points I'm trying to superimpose isn't exactly the density of the data. Is there any other way to do it? From: milton ruser [mailto:[EMAIL PROTECTED] Sent: July 5, 2008 6:56 AM To: Edwin Lei Cc: r-help@r-project.org Subject: Re: [R] trying to superimpose

[R] Random Forest %var(y)

2008-07-05 Thread David Katz
The verbose option gives a display like: > rf.500 <- + randomForest(new.x,trn.y,do.trace=20,ntree=100,nodesize=500, +importance=T) | Out-of-bag | Tree | MSE %Var(y) | 20 | 0.9279 100.84 | What is the meaning of %var(y)>100%? I expected that to correspon

[R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Arnau Mir Torres
Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution of several variables? For example, I want to generate n=100 random vectors of two dimensions for a normal with mean c(0,1) and variance matrix: matrix(c(2,1,1,3),2,2). Thanks in advance, Arnau

[R] interpreting mixed model anova results

2008-07-05 Thread Brooke LaFlamme
Hi, I am trying to do a repeated measures ANOVA to determine if there is a significant difference between two sets of timecourse data. Each individual was given a single treatment and then measured for one variable for 10 days. Here is made-up example of what my data would look like: data<-data.fr

[R] Error: cannot use PQL when using lmer

2008-07-05 Thread hpdutra
I am trying to do an exercise on Crawley's book and I get this error message. I ran the same analysis in the past but now that I upgraded my R in my Macbook I get this message. Is this a bug or what is going on. It doesn't make any sense > library(MASS) > attach(bacteria) > table(y) y n y 43

Re: [R] Error: cannot use PQL when using lmer

2008-07-05 Thread Ben Bolker
yahoo.com> writes: > > > > library(MASS) > > attach(bacteria) > > table(y) > y > n y > 43 177 > > y<-1*(y=="y") > > table(y,trt) >trt > y placebo drug drug+ > 0 12 1813 > 1 84 4449 > > library(lme4) > > model1<-lmer(y~trt+(week|ID),family=binomial,method=

[R] Error: cannot use PQL when using lmer

2008-07-05 Thread hpdutra
> library(MASS) > attach(bacteria) > table(y) y n y 43 177 > y<-1*(y=="y") > table(y,trt) trt y placebo drug drug+ 0 12 1813 1 84 4449 > library(lme4) > model1<-lmer(y~trt+(week|ID),family=binomial,method="PQL") Error in match.arg(method, c("Laplace", "AGQ"))

[R] Problem solved: extracting values from a "by" function

2008-07-05 Thread Daniel Stahl
Hi I just discovered the answer thanks to a previous thread from Peter Daalgart The command is: sapply(test, "[[", "statistic") Cheers, Daniel - Original Message - To: r-help@r-project.org Subject: extracting values from a "by" function Date: Sun, 6 Jul 2008 05:59:04 +0800 Hello, I

[R] extracting values from a "by" function

2008-07-05 Thread Daniel Stahl
Hello, I am trying to extract t and pvalues from a 1000 ttests using the by-function but everythinhg I tried did not work. Unfortunately googling "by" is not very helpful. Any help will be very appreciated. Cheers, Danile Stall *creating a data set library(MASS) dataset <- mvrnorm(160, mu, Sig

[R] using texmacs as front for R on windows xp sp2...

2008-07-05 Thread Brian Lunergan
Hi ho: Has anybody made use of this 'editor' as a front for R v2.7.0? I'm running xp sp2. The texmacs website mentions the possibility of it but seems a little short on instruction or direction to explain the how of it. -- Brian Lunergan Nepean, Ontario Canada --- ___

Re: [R] SciViews GUI

2008-07-05 Thread Philippe Grosjean
Hello, We need a little more information (which platform? which R version?). Also, the GUI is NOT provided with the SciViews package. The version on CRAN is quite outdated and is designed to communicate with the old SciViews R Console GUI for Windows only. We are currently working on a new ver

[R] SciViews GUI

2008-07-05 Thread Felipe Carrillo
HI: After following all the instructions on how to install the SciViews package from CRAN I still can't make the GUI show. Can someone give me a hint on how to do this? I have tried library(svGUI), library(svDialogs) and so on with the rest of the packages. I have also placed all the 'sv' packag

Re: [R] help about random generation of a Normal distribution of

2008-07-05 Thread Ted Harding
There is no need to load the MASS library, since the code for mvrnorm therein is compact and self-contained: mvrnorm <- function (n=1, mu, Sigma, tol=1e-06, empirical=FALSE) { p <- length(mu) if(!all(dim(Sigma) == c(p, p))) stop("incompatible arguments") eS <- eigen(Sigma, symmetric =

Re: [R] Bland-Altman method to measure agreement with repeated measures

2008-07-05 Thread Marc Schwartz
on 07/05/2008 03:17 AM kende jan wrote: Dear all, I want to use the Bland-Altman method to measure agreement with repeated measures collected over period of time (seven periods). How can I do this with R Many thanks The following links should be helpful from a design/methodology perspecti

Re: [R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Gavin Simpson
On Sat, 2008-07-05 at 18:21 +0200, Arnau Mir wrote: > Hello. > > Somebody knows how can I generate a set of n random vectors of a normal > distribution of several variables? > For example, I want to generate n=100 random vectors of two dimensions for > a normal with mean c(0,1) and variance mat

Re: [R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Peng Jiang
Hi, Arnau, mvrnorm() in MASS library is what you need. ? mvrnorm to see the detail but first you need to load the MASS library, i.e,library(MASS) regards/ On 2008-7-6, at 上午12:21, Arnau Mir wrote: Hello. Somebody knows how can I generate a set of n random vectors of a normal distribu

[R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Arnau Mir
Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution of several variables? For example, I want to generate n=100 random vectors of two dimensions for a normal with mean c(0,1) and variance matrix: matrix(c(2,1,1,3),2,2). Thanks in advance, Arnau. _

Re: [R] trying to superimpose a line plot onto a histogram

2008-07-05 Thread milton ruser
How about the answer by Demitris? Regards a lot, miltinho From: Dimitris Rizopoulos <[EMAIL PROTECTED]> Date: Jun 16, 2008 4:05 AM Subject: Re: [R] Superimposing Line over Histogram in Density Plot To: Gundala Viswanath <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] try something like this: x <

Re: [R] Test for multiple comparisons: Nonlinear model, autocorrelation?

2008-07-05 Thread J S
Thanks. Here is a similar example from a book by Pinheiro and Bates (2000, chapter 6): library(nlme) data(Soybean) fm1Soy.lis <- nlsList( weight ~ SSlogis(Time, Asym, xmid, scal),data = Soybean ) fm1Soy.nlme <- nlme( fm1Soy.lis ) If we would like to make comparisons among the years we

Re: [R] set type of SS in anova()

2008-07-05 Thread John Fox
Dear j.c.l.omms, The Anova() function in the car package can compute so-called "type-II" and "type-III" tests. When there are terms in the model that are marginal to others (such as main effects marginal to interactions), type-III tests are of questionable interest and have to be formulated carefu

Re: [R] p-value for Nonmetric Multidimentional Scaling?

2008-07-05 Thread Gavin Simpson
On Fri, 2008-07-04 at 21:14 -0700, Michael Denslow wrote: > Dear R-helpers, > > I am running metaMDS in the vegan package, which uses isoMDS in MASS, > to perform Nonmetric Multidimentional Scaling (NMDS). > > I have seen some authors report a p-value for the NMDS ordination > based on randomizat

Re: [R] update search path for attached data

2008-07-05 Thread Ulrich Leopold
On Fri, 2008-07-04 at 15:13 +0100, Prof Brian Ripley wrote: > On Fri, 4 Jul 2008, Ulrich Leopold wrote: > > > Dear list, > > > > is there a way of updating the search path when using attach() for a data set. > > > > I am overwriting a variable in a data frame. To update teh search path I do > > the

[R] Bland-Altman method to measure agreement with repeated measures

2008-07-05 Thread kende jan
Dear all, I want to use the Bland-Altman method to measure agreement with repeated measures collected over period of time (seven periods). How can I do this with R Many thanks _ o.fr [[alternati

[R] lattice smooth

2008-07-05 Thread Troels Ring
Dear friends - I have a data.frame hh with columns Na ID fit time 135 13 134.7945 60 133 13 132.9084 120 131 13 131.0848 180 129 13 129.3372 240 127 13 127.5546 300 126 13 125.8162 360 124 13 124.1836 420 123 13 122.6077 480 When I use lattice xyplot(Na+fit~time|ID,hh,type=c("s

[R] trying to superimpose a line plot onto a histogram

2008-07-05 Thread Edwin Lei
Hello, I'm trying to superimpose a line plot onto a histogram but I'm not having any luck. I've attached the dataset. What I did was: > hist(data,freq=F) Now I'm trying to superimpose the following points with a line connecting them onto the histogram: xy 100 0.535665393824959 200

Re: [R] synthax for R CMD INSTALL

2008-07-05 Thread Prof Brian Ripley
I do not know what 'the R Utils docs' are, but --configure-args is plural! You are not using the correct shell syntax: you need to use quotes when arguments contain spaces. E.g. --configure-args='--args=val1 --arg2=val2' (and note that quotes are used in error info you quote). That said, th

Re: [R] set type of SS in anova()

2008-07-05 Thread Prof Brian Ripley
drop1() in R meets both your objection and that to 'Type III'. If you really want the so-called Type III, look at function Anova() in package car. But also consider library(fortunes); fortune(54); fortune((55); fortune(56) On Fri, 4 Jul 2008, jeroenooms wrote: When you use the 'general li