Displaying 20 results from an estimated 9000 matches similar to: "compare three values"
2009 Dec 22
2
Nested For loops
Dear R experts,
Might be very simple question to ask but would be insightful. As the same story of nested "for loops". following is the code that I am using to get the autocorrelation function of the sample data. I have tried to get rid of for loops but since I am touching R after such a long time that I need to practice more but I need help to revive my skills. I know that apply() or
2010 Apr 19
2
ecdf
Hello,
I'd like to plot an empirical cumulative distribution function, except
instead of the fraction of values < x, I'd like the fraction of values > x.
I think this can be done using the ecdf function in {Hmisc}. I installed
the package and loaded it. However, when following the example given in the
documentation, I get an error:
x <- rnorm(100)
ecdf(x,what='1-F')
2010 Apr 29
5
reduce size of pdf
is there a way to reduce the size of pdf files in R: ?
compression?
lower dpi ?
or some other option?
2009 Sep 25
3
Problem on plotting TS using GGPLOT
Hi, I have following codes :
library(zoo); library(ggplot2); library(plyr)
dat <- rnorm(306); vv <- letters[1:6]; dat1 <- data.frame(dat, vv)
dat2 = zooreg(rnorm(51), as.yearmon(as.Date("2000-01-01")), frequency=12)
ggplot(dat1) +
geom_line(aes(y=dat, x=index(dat2), colour=vv), group=vv, size =
1.3)
However I got error while plotting them :
2010 Feb 09
2
step and glmer
Is it possible to use the step() function with a glmer() as an object? I
obtain the following error message when I try to do it: "Error in x$terms :
$ operator not defined for this S4 class".
I perform the glmer correctly but I can't do the step.
Thank you so much.
--
View this message in context: http://n4.nabble.com/step-and-glmer-tp1474390p1474390.html
Sent from the R help
2010 Sep 22
1
Ordinal mixed model
Hello,
I am trying to build a generalised linear mixed model.? My dependent variable is
ordinal.? I have a random factor (7 individuals), and a repeated measure where
the dependent variable was measured three times for each of four attempts (so
the repeats are nested).? I also have a few covariates.? I am a complete novice
in R, being used to using SPSS.? SPSS lets me build an ordinal model
2010 May 27
1
adding column to data frame conditionally
Dear all and thanks in advance for helping me with a rather stupid question:
I imported a data set ("freqg") into R consisting of 14 variables. Now
a want to compute a variable and add it in an additional column to my
data frame. The value of this new variable ("condition") depends on
the values of two other variables ("mat" and "flank") already
2010 Jun 09
1
specifying plot symbol sizes in qplot or ggplot2
Hi.
first things first ... thanks for ggplot2.
Now my question. I'm using qplot to generate a plot as follows where X,Y,Z,
A are columns in a dataframe.
qplot(X, Y, data=XYDATA, color=Z, geom=c("point"), size=A)
This works as expected. Factor A has three levels so there are three sizes
of the point plot symbol. I understand that the factor levels are mapped to
symbol sizes.
2010 Jan 15
1
Best method
Hi,
I would like to ask for advice about best statistics method for
my problem.
I was done questionnaire about headache.
My data are:
Y - frequency of symptoms occur - times per month in range <0..30>
(where 30 is daily and zero for never)
and independent variables:
X1 - sex - category {M,F}
X2 - age - linear value
X3 - type of work {administrative, manual, ...}
...
Which model is
2010 Jul 29
1
precision of minus operation and if statments
Hi Everyone,
as part of a larger script, I need to insert the result of a simple minus
operation into an if statement.
I have noticed that the precision that appear on the screen is not the precision
in which R stores the result of the minus operation, and that this change alters
the result of the if statement. For example, when running this simple script:
> a=0.90
> b=0.95
>
2010 Jun 10
2
drawing curve
Sir,
I have a problem regarding drawing curve.I pose the problem as follows:
suppose I have two vectors:
x<-c(1:6)
y<-c(.01,.09,.08,.03,.001,.02)
plot(x,y)
It gives me the plotted points.But I want to draw a smooth curve passing
througt these points.
How can I do this?
Thanks & Regards,
Suman Dhara
[[alternative HTML version deleted]]
2010 Sep 06
1
nlme Output
Everyone -
What do the NaN's mean here? Is this analysis a problem?
Linear mixed-effects model fit by maximum likelihood
Data: tmp.dat
AIC BIC logLik
1611.251 1638.363 -797.6253
Random effects:
Formula: ~1 | group_id
(Intercept) Residual
StdDev: 0.0003077668 9.236715
Fixed effects: AvgTrials ~ time + factor(group_id) + time *
factor(group_id)
2009 Aug 13
4
un run run...
Hi All,
I am running an Rscript with a bunch of algorithms that are UNSTABLE
under some parameter settings.
At a certain point one of them sends error massage and my whole run STOPS!
What I would like is to save the error massage in some file or variable and
carry on to the next command line without stopping this run...
Any help or ideas would be welcome, please, with a concrete example
(not
2010 Aug 18
2
Yet another memory limit problem
Dear List,
I have read and read and still don't get why I am getting a memory issue.? I am
using a Samsung PC running Windows 7.? I have set memory in the target field:
?"C:\Program Files (x86)\R\R-2.11.1\bin\Rgui.exe" --max-mem-size=3G
But when I try a simple plot I get:
>?? plot(mydat$Date,mydat$Time)
Error: cannot allocate vector of size 831.3 Mb
> memory.size()
[1]
2010 Sep 20
1
ggplot2 - bar colour
Hi All,
I have trying to do what I thought was a reasonably simple graph but I think
I'm now going in circles with the colour. Attached is a picture of where I'm
up to.
The line creating this is:
qplot(ageincgraph$age, ageincgraph$rate, position="dodge", stat="identity",
geom="bar" ) + aes( colour=ageincgraph$era) +
2009 Mar 11
3
Mixed models fixed effects
Dear All,
This may sound like a dumb question but I am trying to use a mixed model to
determine the predictors of bat activity along hedges within 8 sites. So my
response is continuous (bat passes) my predictors fixed effects are
continuous (height metres), width (metres) etc and the random effect is
site - can you tell me if the fixed effects can be continuous as all the
examples I have
2009 Sep 08
4
barplot with lines instead of bars
Dear useRs,
I want to plot the following barplot with lines instead of bars. Is there a way?
data <- data.frame(cbind(k = 0:3, fk = c(11, 20,7,2), f0k = c(13.72, 17.64, 7.56, 1.08), fkest = c(11.85, 17.78, 8.89, 1.48)))
d <- t(data[,2:4])
barplot(d, beside=TRUE)
Regards,
Rafael.
____________________________________________________________________________________
[[elided Yahoo
2009 Dec 15
1
for loop for automatic pdf generation
I know this is not reproducible, but I don't want to clog up mail
boxes with the data frame. I would be happy to send this off list. I
am sure that I am missing something simple. The plotting works if I
just paste the call to qplot into R and replace the [i] with a number.
Thanks for all of your help in advance.
#loop to spit out PDFs
list.names <-
2010 Sep 07
3
Something similar to layout in lattice or ggplot
Hi,
Is there a function similar to the layout function in base graphics in
either lattice or ggplot? I'm hoping someone has written a function
wrapper to the appropriate commands in grid that would make this easier :)
Abhijit
[[alternative HTML version deleted]]
2010 Jun 16
2
qplot
Hello,
I am a new r-user, and after a great effort I have made this fantastic
figure with qplot:
qplot(ROI, CBF, fill=factor(Carrier), data=combinedboxplot_dataset_se_1_CBF,
geom="boxplot", position="dodge",xlab=NULL,ylab=("CBF,white
matter-normalized"),main=("Differences between carriers and non-carriers on
baseline"))+theme_bw()
Can anyone help me