Displaying 20 results from an estimated 5000 matches similar to: "Weirdness with choose.files on Microsoft Windows (PR#6818)"
2007 Jun 28
2
aov and lme differ with interaction in oats example of MASS?
Dear R-Community!
The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov and lme without interaction term and the results are the same.
But I have problems to reproduce the example aov with interaction in MASS (10.2, p.301) with lme. Here the script:
library(MASS)
library(nlme)
options(contrasts = c("contr.treatment", "contr.poly"))
# aov: Y ~
2004 Jul 27
1
re: help with lattice plot
Dear List,
I have been using R to create an xyplot using the panel function within
lattice libraries. This plot is based on the data supplied in R named
'Oats'. The graph represents oat yield by nitro level with an overlay of
each variety of oats for each nitro level.
I have three questions regarding this graph:
1) I cannot seem to specify the type of symbol used by the plot, even
though
2009 Oct 30
1
How to properly shade the background panels of an xyplot?
Dear R users,
this is a follow up of this message
http://tolstoy.newcastle.edu.au/R/e6/help/09/05/13897.html
I'm reproducing the core of it for convenience.
> //
> / data(Oats, package = "MEMSS") /
> / tp1.oats <- xyplot(yield ~ nitro | Variety + Block, /
> / data = Oats, /
> / panel = function(x, y, subscripts, ...) { /
2009 Oct 10
1
lattice auto.key drop unused levels
The following code produces a legend ("key") that mentions the unused
levels of Block.
library(MEMSS)
xyplot(yield~nitro, subset=(Block=="I" | Block=="II"), data=Oats,
group=Block, auto.key=T)
and adding "drop.unused.levels=T" does not fix it. And in fact even
the following does not solve the problem:
xyplot(yield~nitro,
2009 Apr 21
3
broken example: lme() + multcomp() Tukey on repeated measures design
I am trying to do Tukey HSD comparisons on a repeated measures expt.
I found the following example on r-help and quoted approvingly elsewhere.
It is broken. Can anyone please tell me how to get it to work?
I am using R 2.4.1.
> require(MASS) ## for oats data set
> require(nlme) ## for lme()
> require(multcomp) ## for multiple comparison stuff
> Aov.mod <- aov(Y ~ N + V +
2010 Jan 19
1
A model-building strategy in mixed-effects modelling
Dear all,
Consider a completely randomized block design (let's use data(Oats)
irrespoctive of the split-plot design it was arranged in). Look:
library(nlme)
fit <- lme(yield ~ nitro, Oats, random = ~1|Block, method="ML")
fit2 <- lm(yield ~ nitro + Block, Oats)
anova(fit, fit2)
gives this:
Model df AIC BIC logLik Test L.Ratio p-value
fit 1 4 624.3245
2009 Oct 12
3
xyplot does not find variable in data
When we call a lattice function such as xyplot, to what extent does
the "data" designation cause the function to look inside the "data"
for variables?
In the examples below, the "subset" argument understands that
"Variety" is a variable in the data.
But the "scales" argument does not understand that "nitro" is a
variable in the data.
2006 Sep 23
1
variance-covariance structure of random effects in lme
Dear R users,
I have a question about the patterned variance-covariance structure for the random effects in linear mixed effect model.
I am reading section 4.2.2 of "Mixed-Effects Models in S and S-Plus" by Jose Pinheiro and Douglas Bates.
There is an example of defining a compound symmetry variance-covariance structure for the random effects in a
split-plot experiment on varieties of
2008 Apr 16
1
transposition problem
Hi use Rs,
I have a csv file:
"1989-90","1990-91"
Barley,23,34
Oats,15,16
Which I want to turn into:
year, Barley, Oats
1 "1989-90", 23, 15
2 "1990-91",34,16
Transpose doesn't quite do it, is there a standard way?
Cheers,
Geoff Russell
2005 Dec 05
2
plot() and points() precision control
Hi all,
I have a problem in that when I plot points that have a high degree of
precision, some significant rounding seems to occur, resulting in
uneccessary overlap of my points. Is there a way to specify the
resolution or precision in plotting functions? Is there an underlying
grid I have to modify somehow?
Many Thanks,
Jon
--
Mares eat oats and does eat oats and little lambs eat ivy. A
2011 Nov 29
2
Help needed in reproducing a plot
Hello,
can anybody tell me how to produce a plot like the one in
http://cran.r-project.org/web/packages/lme4/vignettes/Implementation.pdf
on page 13, Figure 6?
The data is stored in:
library(nlme)
data(Oats)
Cheers
--
View this message in context: http://r.789695.n4.nabble.com/Help-needed-in-reproducing-a-plot-tp4119603p4119603.html
Sent from the R help mailing list archive at
2009 Oct 22
1
data frame is killing me! help
Usage
data(gasoline)
Format
A data frame with 60 observations on the following 2 variables.
octane
a numeric vector. The octane number.
NIR
a matrix with 401 columns. The NIR spectrum
and I see the gasoline data to see below
NIR.1686 nm NIR.1688 nm NIR.1690 nm NIR.1692 nm NIR.1694 nm NIR.1696 nm
NIR.1698 nm NIR.1700 nm
1 1.242645 1.250789 1.246626 1.250985 1.264189 1.244678 1.245913
2017 Jul 13
3
How to formulate quadratic function with interaction terms for the PLS fitting model?
I have two ideas about it.
1-
i) Entering variables in quadratic form is done with the command I
(variable ^ 2) -
plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation =
"LOO"
You could also use a new variable NIR_sq <- (NIR) ^ 2
ii) To insert a square variable, use syntax I (x ^ 2) - it is very
important to insert I before the parentheses.
iii) If you want to
2017 Jul 13
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
Below.
-- Bert
Bert Gunter
On Thu, Jul 13, 2017 at 3:07 AM, Luigi Biagini <luigi.biagini at gmail.com> wrote:
> I have two ideas about it.
>
> 1-
> i) Entering variables in quadratic form is done with the command I
> (variable ^ 2) -
> plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation =
> "LOO"
> You could also use a new variable
2017 Jul 16
2
How to formulate quadratic function with interaction terms for the PLS fitting model?
> On Jul 13, 2017, at 7:43 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> Below.
>
> -- Bert
> Bert Gunter
>
>
>
> On Thu, Jul 13, 2017 at 3:07 AM, Luigi Biagini <luigi.biagini at gmail.com> wrote:
>> I have two ideas about it.
>>
>> 1-
>> i) Entering variables in quadratic form is done with the command I
>>
2017 Oct 10
1
Unbalanced data in split-plot analysis with aov()
Dear all,
I'm analysing a split-plot experiment, where there are sometimes one or
two values missing. I realized that if the data is slightly unbalanced,
the effect of the subplot-treatment will also appear and be tested
against the mainplot-error term.
I replicated this with the Oats dataset from Yates (1935), contained in
the nlme package, where Variety is on mainplot, and nitro on
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
??
If I haven't misunderstood, they are completely different!
1) NIR must be a matrix, or poly(NIR,...) will fail.
2) Due to the previously identified bug in poly, degree must be
explicitly given as poly(NIR, degree =2,raw = TRUE).
Now consider the following example:
> df <-matrix(runif(60),ncol=3)
> y <- runif(20)
> mdl1 <-lm(y~df*I(df^2))
> mdl2
2012 Oct 07
3
what exactly is the dim of data set yarn in package "pls"?
Hi list,
I am looking at the data yarn in package, I don't understand what is
dimension of this data set.
I did the following:
> library(pls)
> data(yarn)
> dim(yarn)
[1] 28 3
> head(yarn)
NIR.1 NIR.2 NIR.3 NIR.4 NIR.5 NIR.6 NIR.7 NIR.8 NIR.9
NIR.10 NIR.11
1 3.06630 3.08610 3.10790 3.09720 2.99790 2.82730 2.62330 2.40390 2.19310
2.00580 1.83790
2
2005 Apr 21
1
Strange data frame
Hello,
I'm playing around with the PLS package and found a data set (NIR) whose
structure I don't understand. Forgive me if this is a stupid question,
as I feel like it must be since I am less experienced with aspects of
modeling.
My problem, the pls NIR data frame does not seem to be a typical data
frame as, while it is a list, its variables are not of equal length.
Furthermore, I have
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
Dear all,
I am using the pls package of R to perform partial least square on a set of
multivariate data. Instead of fitting a linear model, I want to fit my
data with a quadratic function with interaction terms. But I am not sure
how. I will use an example to illustrate my problem:
Following the example in the PLS manual:
## Read data
data(gasoline)
gasTrain <- gasoline[1:50,]
## Perform