Displaying 20 results from an estimated 192 matches for "groupeddata".
2018 Mar 22
3
How do I include a factor in a groupedData object? Meaning and use of inner and outer parameters
Windows 10 64-bit, R-Studio, R version 3.4.3
Several questions relating to groupedData:
(1) I am trying to create a groupedData object that can be used to run an analysis that I have been able to urn using lmer. When I include the interaction terms in the groupedData opbject I get an error message stating that + is not meaningful for factors. How do I include factors in my model? Se...
2008 Jun 04
2
Constructing groupedData objects in nlme - a little problem
Dear R-help,
I am trying to create groupedData objects using the nlme library. I'm
missing something basic, I know:
Here is the first example in ch.1 of Pinheiro & Bates (2000):
library(nlme)
x2=Rail$travel;x1=Rail$Rail;eg1=data.frame(x1,x2);eg1gd=Rail
print(eg1gd)
x11();print(plot(eg1gd))
femodel=lm(x2~x1-1,data=eg1gd)
print(femodel$...
2004 Jul 23
2
lme4 groupedData is missing
help.search("groupedData") says that it's part of the lme4 package, but it
appears not to be there (details below). Is this because lme4 is new and
(perhaps) still under development?
> update.packages()
trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES'
Content type `text/plain; charse...
2010 Nov 08
2
Several lattice plots on one page
...0),
var3 = c(10,20,300,40000),
var4 = c(100000,20000,30000,4000),
var5 = c(10,20,30,40),
var6 = c(0.001,0.002,0.003,0.004),
var7 = c(123,223,123,412),
var8 = c(213,123,234,435),
all = as.factor(c(1,1,1,1)))
pdf("test1.pdf", width=20, heigh=27, paper="a4")
print(plot(groupedData(var1 ~ day | all, data = df), main = "var1", xlab="", ylab=""), split=c(1,1,2,4), more=TRUE)
print(plot(groupedData(var2 ~ day | all, data = df), main = "var2", xlab="", ylab=""), split=c(1,2,2,4), more=TRUE)
print(plot(groupedData...
2005 Mar 17
2
Repeated Measures, groupedData and lme
...primary separating
variable.
I am looking at soil mineral data were collected : 99, 02, 04.
In the experiment, there are 19 different treatments (treatmentcontrol,
treatment6TFYM, treatment 12TFYM etc), which are replicated in 3
blocks.
For the magnesium soil data, I have created the following groupedData
object:
magnesium<-groupedData(Mg~year|treatment, inner=~block)
Where mg=magnesium Kg/ha
As it is a repeated measures I was going to use an lme. I have looked
at Pinherio and Bates : Mixed-Effects models in S and S-plus and I am
getting slightly confused. In order to fit the lme, should I...
2006 Dec 07
2
groupedData Error Using outer=TRUE
I'm using groupedData from nlme. I set up a groupedData data.frame with
outer=~group1. When I try to plot with outer=TRUE, I get "subscript out
of bounds." This happens most of the time. When it works, I get
spaghetti-type plots for comparing groups. But I don't understand why it
doesn't usually work....
2018 Mar 22
0
How do I include a factor in a groupedData object? Meaning and use of inner and outer parameters
Dear John
You are only allowed to have the primary covariate on the left hand side
of the vertical bar. Other covariates go in inner or outer.
Michael
On 22/03/2018 12:59, Sorkin, John wrote:
> Windows 10 64-bit, R-Studio, R version 3.4.3
>
>
> Several questions relating to groupedData:
>
> (1) I am trying to create a groupedData object that can be used to run an analysis that I have been able to urn using lmer. When I include the interaction terms in the groupedData opbject I get an error message stating that + is not meaningful for factors. How do I include factors in my...
2007 Dec 27
2
groupedData function not found
Hello,
I'm trying to use the groupedData function and R is giving me the message: Error: can not find function "groupedData"
The code is coming from a textbook so I think it should be correct:
pigs<-data.frame(cbind(pig.time,pig.id,pig.wt))
pig.growth<-groupedData(pig.wt~pig.time|pig.id,data=pigs)
I have added the packag...
2000 Jul 24
1
How to use groupedData() within a function?
Dear Group:
I have been trying to write an R function within which the function
groupedData() would be used.
The following is a sample program:
#######################
sid<-rep(1:6,times=2)
time<-c(1:12)
trt<-rep(letters[1:3],times=4)
tem<-data.frame(sid,time,trt)
test1.fun<- function(dat=dat)
{
groupedData(time ~ trt|sid, data=dat)
}
test1.fun(dat=tem)
##############...
1997 Dec 02
1
R-alpha: NextMethod in 0.50-a4
I am encountering difficulty with NextMethod in 0.50-a4. We created a
class of groupedData objects which are data.frames with additional
attributes. The most important attribute is a formula describing
roles of some of the variables in the experimental design.
The class of such objects ends in "groupedData", "data.frame". The
print method for the groupedData class...
2009 Jul 14
1
Problem with GroupedData
...1)
names(data1)
[1] "Date" "d" "m" "y" "Time"
[6] "Depth" "Temp" "Group_Time"
Recently, i try two add a column into this data frame, but when i try to use the 'groupedData' function with this new data frame via command below, it reported the problem stated after the command below.
library(nlme)
tmp <- groupedData(Temp ~ d | Depth, data2, order.groups = TRUE, labels = list(x = "Month", y = "Temperature"), units = list(y = "0C"))...
2008 Jul 19
1
wroung groupedData despite reading Bates and Pinheiro 3 times
Hi everyone. I am trying to add a formula to my data using the groupedData
function.
My experiment consists of randomized block design using fruits, vegetation
and time as factors. The idea is to see if fruits, vegetation and time
explain the abundance of mice. I am using tree density as a covariate.
So I tried to fit the following structure to my data.
> traps<-gro...
2002 Oct 30
1
groupedData
Dear all,
I tried to create a groupedData object, where the grouping factor
is not ordered.
Here ist the code:
library(nlme)
test<-groupedData(conc~Time|Subject,order.groups=F,data=as.data.frame(Theoph))
> getGroups(test)
Levels: 6 < 7 < 8 < 11 < 3 < 2 < 4 < 9 < 12 < 10 < 1 < 5
I still get an orde...
2012 Mar 15
1
Accessing variable's name as an attribute?
Sorry - I suspect this is a very basic query.
I have a data frame structured "flat" (i.e. separate observations for a given subject ID on separate lines). Using the nlme library I create a groupedData object suitable for further analysis thus:
dataset <- groupedData(VARIABLE ~ TIME|ID, data=sfa)
The dataset has a large number of VARIABLES of interest so I want to make use of loops where possible to build groupedData objects from each of the relevant columns along the lines of:
sfa <- na...
2001 Nov 19
1
scope of data in groupedData
I'm trying to write a function that has a dataframe as
an argument. Within the function, I call groupedData
to create a grouped-data object from the dataframe
argument. However, the groupedData function doesn't
seem to see the data. I'm guessing it's getting the
argument name rather than its value, but I'm not
positive.
My system: R 1.3.1 on WinNT 4.0 (Pentium II), nlme
version 3.1-17...
2010 Sep 10
1
lme, groupedData, random intercept and slope
Windows Vista
R 2.10.1
Does the following use of groupedData and lme produce an analysis with both random intercept and slope, or only random slope?
zz<-groupedData(y~time | Subject,data=data.frame(data),
labels = list( x = "Time",
y = "y" ),
units = list( x = "(yr)", y = "(...
2009 Jul 02
1
Problem with groupedData and lme
Dear R-users,
I'm currently having trouble with the implementation of a groupedData
object in the lme() function.
Executing the following function
> applyScalingSimp <- function(input.population)
> {
> ## GA is a time value
> varInOrder <- c("GA","weight","grouping","sex")
> modelVar <- c(&qu...
2004 Aug 26
1
Plotting groupedData objects
...ls for the two treatment groups in separate
groups and within those groups have the panels ordered on maximum value
(as is the default).
I am ok with getting plots similar to Figs 3.1 and 3.2, but can't see how
to change the ordering of the panels to what I want.
Here is the definition of my groupedData object
RAWlmeData <- groupedData(RAW~Elapsed|ID,
data=RAWData,
labels=list(x="Elapsed time",y="Airways resistance"),
units=list(x="(hours)",y="cm H20/L/sec"))
I guess I could just plot the two treatment groups se...
2006 Nov 22
1
plotting a groupedData object
Hello all,
I am plotting a groupedData object and the key at the top of the graph runs
off the page. I don't want to set key=F because it is useful (or would be if
I could see it).
Is it possible to explicitly cause the key to wrap? I have used this
function before with no trouble but now I have just 5 groups with rather
long de...
2007 Mar 04
1
plot groupedData in nlme
Hi,
Does anyone know how to make the color of the lines all black when
plotting groupedData with an outer factor:
For example,
library(nlme)
plot(Dialyzer, outer=~QB, key=F)
This generated colored curves in R.2.4.1. How to make all the curves black ?
(or how to alter the color (type) of lines for the nlme groupedData
plotting function in general?)
Thanks
Qiong