Displaying 20 results from an estimated 1000 matches similar to: "xyplot of a specific ID number"
2009 Mar 17
1
coefficient graph
Dear R list members,
I'd like to make a graph of coefficients of the intercept, variable 1, and
variable 2 (and possibly the interaction between variable 1 and variable
2). When I use the lmList function as attached below, it shows a nice
coefficient graph.
> PACRP.lis <- lmList(PAffect ~ CRPC + CRPT + CINT | ID, redinteract)
> coef(PACRP.lis)
> PACRPlis.coef <-
2007 Jul 16
5
formula(CO2)
The formula attribute of the builtin CO2 dataset seems a bit strange:
> formula(CO2)
Plant ~ Type + Treatment + conc + uptake
What is one supposed to do with that? Certainly its not suitable for
input to lm and none of the examples in ?CO2 use the above.
2010 Dec 17
2
newbie question on str output
Hi!
Here is some output from an str command:
> str(CO2)
Classes ‘nfnGroupedData’, ‘nfGroupedData’, ‘groupedData’ and
'data.frame': 84 obs. of 5 variables:
$ Plant : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 1 1 1 1 1 1 1 2
2 2 ...
$ Type : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1 1 1 1 1
...
$
2006 Mar 15
1
filtering in aggregate
Hello all,
I have a data frame with year, month, species, fishing gear and catch
(Y, M, S, F, C) and I want the sum of C by Y for species "A" and fishing
gear "trawl".
I tried things like aggregate(C[S=="A" & F=="trawl"], list (Year =
Y[S=="A" & F=="trawl"]), fun=sum), but it didn't worked.
To overcome this problem I did
2007 Jun 04
3
test for nested factors
Is there a conventional way to test for nested factors? I.e., if 'a'
and 'b' are lists of same-length factors, does each level specified by
'a' correspond to exactly one level specified by 'b'?
The function below seems to suffice, but I'd be happy to know of a more
succinct solution, if it already exists.
Thanks,
Tim.
---
"%nested.in%" <-
2010 Apr 30
1
QIC for GEE
Hi,
I'm using 'geepack' to run Generalized Estimating Equations. I'm aware that
I can use anova to compare two models, but would it be possible to test QIC
on R? It seems that there were similar questions a couple of years ago, but
the question has not been answered yet.
I'd appreciate if someone could show me the code!
Thank you,
Sachi
[[alternative HTML version
2010 Apr 29
1
Generalized Estimating Equation (GEE): Why is Link = Identity?
Hi,
I'm running GEE using geepack.
I set corstr = "ar1" as below:
> m.ar <- geeglm(L ~ O + A,
+ data = firstgrouptxt, id = id,
+ family = binomial, corstr = "ar1")
> summary(m.ar)
Call:
geeglm(formula = L ~ O + A, family = binomial,
data = firstgrouptxt, id = id, corstr = "ar1")
Coefficients:
2009 Jun 11
1
formula for degrees of freedom for nonlinear mixed model in nlme
Dear forum members,
What is the formula to calculate denominator degrees of freedom (den df) for nonlinear mixed-effect models with covariates? My model is similar to a CO2 uptake example from Pinheiro and Bates (2000, page 376). In this CO2 dataset, there are two treatments and two types (84 observations in total), but den df for each parameter of the model is 64. Isn’t it too high?
Your
2008 Dec 12
1
How can we predict differences in a slope, given that the random component was significant?
Dear R users,
Using R lme function, I found that both fixed and random effects of variable
A on variable B are significant. Now, I'd like to analyze what variables
are predicting differences in the slope. In other words, I'd like to know
what variables (e.g., variable C) are predicting individual differences in
the effects of A on B. I have many data points for A and B for each
2013 Jul 01
2
Problem with anova and the new abbreviation restrictions
An unwanted side effect of the new restrictions on abrreviated names.
The anova.coxph command, in a slavish copy of anova.lm etc, returns a data frame with
column labels of
loglik Chisq Df Pr(>|Chi|)
If one tries to extract the final column of the table errors result since it is not a
standard R variable name.
> afit <- anova(lm(conc ~ uptake, CO2))
> afit$P
[1]
2017 Oct 08
2
Manipulations with CO2 dataset on R
Hi,
I just started a new course this semester on R, I never used it in my life and i'm stuck on these questions from 3 days, it would be really nice if someone could explain me the answers with the relative commands.
thanks a lot in advance
The following 7 questions are based on the CO2 dataset of R.
1) How many of the plants in CO2 are Mc2 for Plant?
2) How many are either Mc2 or Mn2?
2010 May 07
4
Any way to apply TWO functions with tapply()?
I need to compute the mean and the standard deviation of a data set and would
like to have the results in one table/data frame. I call tapply() two times
and do then merge the resulting tables to have them all in one table. Is
there any way to tell tapply() to use the functions mean and sd within one
function call? Something like tapply(data$response, list(data$targets,
data$conditions), c(mean,
2006 Aug 10
2
index.cond in xyplot
Dear R-users
I have 5 dependent variables (y1 to y5) and one independent variable (x) and
3 conditioning variables (m, n, and 0). Each of the conditioning variables
has 2 levels. I created 2*4 panel plots.
xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2))
I would like to reorder the 8 panels. I tried to use index.cond (e.g.,
index.cond = list(c(1,3,2,4,5,7,6,8)) but it didn't work out.
2010 Apr 29
1
Changing from 32-bit builds to 64-bit builds
Hi,
Probably this is a very simple question for all the programmers, but how do
you change from 32-bit builds (default) to 64-bit builds?
I've been trying to run Anova to compare two models, but I get the following
error message:
Error: cannot allocate vector of size 1.2 Gb
R(3122,0xa0ab44e0) malloc: *** mmap(size=1337688064) failed (error code=12)
*** error: can't allocate region
***
2007 Jan 29
6
Loop with string variable AND customizable "summary" output
Dear All,
I am using R for my research and I have two questions about it:
1) is it possible to create a loop using a string, instead of a numeric vector? I have in mind a specific problem:
Suppose you have 2 countries: UK, and USA, one dependent (y) and one independent variable (y) for each country (vale a dire: yUK, xUK, yUSA, xUSA) and you want to run automatically the following regressions:
2010 Jun 08
1
GEE: estimate of predictor with high time dependency
Hi,
I'm analyzing my data using GEE, which looks like below:
> interact <- geeglm(L ~ O + A + O:A,
+ data = data1, id = id,
+ family = binomial, corstr = "ar1")
> summary(interact)
Call:
geeglm(formula = lateral ~ ontask + attachment + ontask:attachment,
family = binomial, data = firstgroupnowalking, id = id, corstr = "ar1")
Coefficients:
2011 Aug 20
1
Groups and bwplot
Dear R-users,
A while ago, Deepayan Sarkar suggested some code that uses the group
argument in bwplot to create some 'side-by-side' boxplots
(https://stat.ethz.ch/pipermail/r-help/2010-February/230065.html). The
example he gave was relatively specific and I wanted to generalize his
approach into a function. Unfortunately, I seem to have some issues
passing the correct arguments to the
2008 Dec 28
2
how to generalize the arguments for lm() (r-help@lists.R-project.org)
Hello,
How could I generalize the following statement for an arbitrary number of columns instead of 7?
result[[i]]<-lm( returns[,i] ~ factors[,1] + factors[,2] + factors[,3] + factors[,4] + factors[,5] + factors[,6] + factors[,7] )
Thank you,
Mathgurl
[[alternative HTML version deleted]]
2007 May 05
1
dynamically specifying regressors/RHS variables in a regression
Does anyone know if there is a way to specify regressors dynamically
rather than explicitly?
More specifically, I have a data set in "long format" that details a
number of individuals and their responses to a question (which can be
positive, negative, or no answer). Each individual answers as many
questions as they want, so there are a different number of rows per
individual.
For each
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
The following works fine with the x11 device, though it
may well be that an initial plot is overwritten. With a pdf
or postscript device, I get two plots, the first of which
still has the red border from having the focus, while the
second is the plot that I want.
library(lattice); library(grid)
plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2)
print(plt)