Specify na.action = na.exlude, e.g.
x - y - 1:10; x[5] - NA
fitted(lm(y ~ x, na.action = na.exclude))
1 2 3 4 5 6 7 8 9 10
1 2 3 4 NA 6 7 8 9 10
On 9/14/06, Robi Ragan [EMAIL PROTECTED] wrote:
I am running a regression:
ols.reg1 - lm(y ~ x1 + x2 + x3 + x4)
on a data.frame
Hi,
Can Someone inform me how to generate RV's using the below CDF, by inverse
technique.
Thanks for your help and time.
My CDF is as follows
\[
F(x)=0 \ \text{if} \ x 0\]\[
F(x)=\{\frac{x-x_i}{x_{i+1}-x_{i}}*(p_{i+1}-p_{i})\}+p_{i}\
\forall \ x_{i}\leq x x_{i+1} \]
\[ F(x)=1 \ \text{if} \
?na.exclude should help you: my guess is that you asked (by using the
default) na.action = na.omit) for rows with missing values to be excluded
from the residuals. But since you have not mentioned missing values, we
have to guess what 'for some reason' was: please note the footer of this
Tao Shi [EMAIL PROTECTED] writes:
Again, I don't see the error in R under Windows (R 2.3.0) or Unix (R2.3.1).
Is this the bug you were talking about?
CHANGES IN R VERSION 2.3.0
o Some of the classical tests put unnecessary restrictions on the
LHS in the
- Original Message -
From: Manuel Morales [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Douglas Bates [EMAIL PROTECTED]; Manuel Morales
[EMAIL PROTECTED]; r-help@stat.math.ethz.ch
Sent: Wednesday, September 13, 2006 1:04 PM
Subject: Re: [R] Conservative ANOVA tables in lmer
On Wed,
On 9/13/06, Dimitris Rizopoulos [EMAIL PROTECTED] wrote:
- Original Message -
From: Manuel Morales [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Douglas Bates [EMAIL PROTECTED]; Manuel Morales
[EMAIL PROTECTED]; r-help@stat.math.ethz.ch
Sent: Wednesday, September 13, 2006 1:04 PM
Despite having used R on a daily basis for the past two years, Im
encountering some difficulty performing an ANOVA on my data. What Im trying
to do is the following:
Given data such as:
Day 1 Day 4 Day 8
2 7 2
3 2 8
3 4 7
On 9/13/06, Dimitris Rizopoulos [EMAIL PROTECTED] wrote:
- Original Message -
From: Manuel Morales [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Douglas Bates [EMAIL PROTECTED]; Manuel Morales
[EMAIL PROTECTED]; r-help@stat.math.ethz.ch
Sent: Wednesday, September 13, 2006 1:04 PM
Despite having used R on a daily basis for the past two years, I'm
encountering some difficulty performing an ANOVA on my data. What I'm trying
to do is the following:
Given data such as:
Day 1Day 4Day 8
2 7 2
3 2 8
3 4
Try
test - data.frame(day.1=c(2,3,3,6,1),
day.4=c(7,2,4,6,3),
day.8=c(2,8,7,8,4))
test
test.long - reshape(test, direction=long,
varying=c(day.1,day.4,day.8),
v.names=response,
timevar=day,
times=names(test))
test.long$day -
Dear R users!
I have some problems with some cronjobs containing R programs in batch
mode. The CPU load always is quite high, as I plot some weather charts
which require extensive interpolation procedures. The crucial point is
that I frequently get R input/output errors, if my linux PC
Andrew Robinson [EMAIL PROTECTED] writes:
Try
test - data.frame(day.1=c(2,3,3,6,1),
day.4=c(7,2,4,6,3),
day.8=c(2,8,7,8,4))
test
test.long - reshape(test, direction=long,
varying=c(day.1,day.4,day.8),
v.names=response,
timevar=day,
Andrew, Peter,
Thanks both for the help, that's exactly what I was after.
It is for a one-way ANOVA, looking at identifying differentially expressed
genes across time in a microarray dataset. Also, one of the datasets I'm
working with is unbalanced, so that additional code will be most useful.
Hello,
does anyone have code that will generate a greedy triangulation
(triangulation that uses shortest non-overlapping edges) for a set of points
in Euclidean space?
Thanks,
Dan Bebber
___
Dr. Daniel P. Bebber
Department of Plant Sciences
University of Oxford
South Parks
Douglas Bates bates at stat.wisc.edu writes:
On 9/13/06, Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
I believe that the LRT is anti-conservative for fixed effects, as
described in Pinheiro and Bates companion book to NLME.
You have this effect if you're using REML, for
Bianca Vieru wrote:
Hi,
I try to calculate Kendall's W coefficient and I have a bizarre error.
little.app.mat-matrix(c(1,3,4,2,6,5,2,4,3,1,5,6,3,2,5,1,5,4),nrow=3,byrow=TRUE)
print(kendall.w(little.app.mat[-1,]))
Kendall's W for ordinal data
W = 0.7753623Error in if
Gregor Gorjanc [EMAIL PROTECTED] writes:
Douglas Bates bates at stat.wisc.edu writes:
On 9/13/06, Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
I believe that the LRT is anti-conservative for fixed effects, as
described in Pinheiro and Bates companion book to NLME.
On 9/14/2006 2:16 AM, nmi13 wrote:
Hi,
Can Someone inform me how to generate RV's using the below CDF, by inverse
technique.
Thanks for your help and time.
My CDF is as follows
\[
F(x)=0 \ \text{if} \ x 0\]\[
F(x)=\{\frac{x-x_i}{x_{i+1}-x_{i}}*(p_{i+1}-p_{i})\}+p_{i}\
\forall \
Hullo,
Can someone suggest whether the binomial test as described in the link
http://home.clara.net/sisa/binomial.htm is available in an equivalent form
in R? I have downloaded the R package from the CRAN site.
Using R will help me do this test rapidly
Many Thanks
Ramachandran
Dr. S.
Srinivasan Ramachandran [EMAIL PROTECTED] writes:
Hullo,
Can someone suggest whether the binomial test as described in the link
http://home.clara.net/sisa/binomial.htm is available in an equivalent form
in R? I have downloaded the R package from the CRAN site.
Using R will help me do
Dear list,
I use SciViews R Console 0.8.9 with R-2.2.1 under Windows XP SP2, and
it works very well for most of time. However, sometimes, when
commands were executed by clicking F5, the error Run-time error 521,
Can't open clipboard pop out. After choosing Yes, the both R
console and SciViews
All,
I have a question RE plotting the prediction lines of a random effects
model via augPred. I'll illustrate via the Pixel dataset within the
nlme package:
library(nlme)
attach(Pixel)
fm1Pixel = lme(pixel ~ day + I(day^2), data = Pixel, random = list(Dog =
~ 1))
plot(augPred(fm1Pixel)) ###
Dear R-forum,
I am looking for a good resource/help on working with POSIXct values and
controlling the pretty x-axis labels and tick marks for a data VS time
plots. Specifically, I wish to do programming logic which creates
different vertical ablines calculations based on the range of times
which
Hello,
I am trying to model an intensity function with time-varying covariates.
Before, I have successfully defined a log likelihood function for a
Power-Law Process (lambda(t)=alpha*beta*t^(beta-1)) with two paramters
and no covariates for a repairable systems with failure times (t).
This
I'd like to be able to set options(error=recover) in my Rprofile.site file.
When I do this I get the message
Error in options(error = recover) : object recover not found
I assume this is because the utils package (where recover and dump.frames
are defined) has not been loaded at the time I make
Does the deldir package do what you want?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Bebber
Sent: Thursday, September 14, 2006
Or, perhaps, tripack?
url:www.econ.uiuc.edu/~rogerRoger Koenker
email[EMAIL PROTECTED]Department of Economics
vox: 217-333-4558University of Illinois
fax: 217-244-6678Champaign, IL 61820
On Sep 14, 2006, at 10:32 AM, Greg
Thanks, but no, the Delaunay is different.
I have written the following, which interested persons might want to check
for accuracy and streamlining:
#GREEDY TRIANGULATION
#
#Pick all lines that are shortest and don't overlap, starting with shortest.
#
greedy-function(xy){ #input is a matrix
Have a look at the survSplit function in the survival package. It looks to
me as though you could use survreg with the weibull option to achieve what
you want. Otherwise, you'll have to rewrite the likelihood in terms of both
start and end times.
On 14/09/06, Martin Wagner [EMAIL PROTECTED]
On Thu, 14 Sep 2006, Marcus, Jeffrey wrote:
I'd like to be able to set options(error=recover) in my Rprofile.site file.
When I do this I get the message
Error in options(error = recover) : object recover not found
I assume this is because the utils package (where recover and dump.frames
are
Hi,
I am finding that I get quite different results when I interchange the
following equivalent lines for sampling from a beta distribution in my
r script. The rbeta line is correct judging by the summary statistics of
the simulated values, while the qbeta line consistently leads to a
higher mean
Dear R heplper,
I'm using polr:
fm - polr(factor(y) ~ x, ,method='logistic', data = dat, Hess=T)
ans I'm getting a very strange message:
Error in optim(start, fmin, gmin, method = BFGS, hessian = Hess, ...) :
initial value in 'vmmin' is not finite
Can you help me?
Thank you in advance,
Grazia
On 9/14/2006 1:42 PM, Mark Pinkerton wrote:
Hi,
I am finding that I get quite different results when I interchange the
following equivalent lines for sampling from a beta distribution in my
r script. The rbeta line is correct judging by the summary statistics of
the simulated values, while
Dear RUsers,
I am new to R. I am learning how to use R. I am a PC user and run R on
windows. I would appreciate if some one could guide me on a few questions I
have:
1) I have 4 cel files (2 replicates for NORM and Disease resp). I have been
able to run siggenes on this dataset where I have 4
Hi,
consider this:
--
estr - c(2^4, alpha[1])
eexp - expression(2^4, alpha[1])
## Is it possible to get 'eexp' starting from 'estr'? The closest I could
## get was:
do.call(expression, lapply(estr, as.name))
## but it is not quite the same; e.g. the following behave differently:
Deepayan Sarkar [EMAIL PROTECTED] writes:
Hi,
consider this:
--
estr - c(2^4, alpha[1])
eexp - expression(2^4, alpha[1])
## Is it possible to get 'eexp' starting from 'estr'? The closest I could
## get was:
do.call(expression, lapply(estr, as.name))
## but it is
Deepayan Sarkar said the following on 9/14/2006 2:31 PM:
Hi,
consider this:
--
estr - c(2^4, alpha[1])
eexp - expression(2^4, alpha[1])
## Is it possible to get 'eexp' starting from 'estr'? The closest I could
## get was:
do.call(expression, lapply(estr, as.name))
On 14 Sep 2006 21:44:01 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote:
Deepayan Sarkar [EMAIL PROTECTED] writes:
Hi,
consider this:
--
estr - c(2^4, alpha[1])
eexp - expression(2^4, alpha[1])
## Is it possible to get 'eexp' starting from 'estr'? The closest I
sapply(estr, FUN=function(x) parse(text=x))
and it does print the greek letter in the xlab.
xyplot(1:10 ~ 1:10,
scales = list(x = list(at = c(3, 6),
labels = sapply(estr, FUN=function(x) parse(text=x)
Rich
__
On Thu, 14 Sep 2006, Deepayan Sarkar wrote:
[...]
Ah, I'd forgotten about parse. A link from ?expression might be reasonable.
But it says
Details:
'Expression' here is not being used in its colloquial sense, that
of mathematical expressions. Those are calls (see 'call') in R,
Prof Brian Ripley [EMAIL PROTECTED] writes:
On Thu, 14 Sep 2006, Deepayan Sarkar wrote:
[...]
Ah, I'd forgotten about parse. A link from ?expression might be reasonable.
But it says
Details:
'Expression' here is not being used in its colloquial sense, that
of
Thanks Gabor, that is much faster than using a loop!
I've got a last question:
Can you think of a fast way of keeping track of the number of
observations collapsed for each entry?
i.e. I'd like to end up with:
A 2.0 400 ID1 3 (3obs in the first matrix)
B 0.7 35 ID2 2 (2obs in the first matrix)
Peter Dalgaard [EMAIL PROTECTED] writes:
Actually, you need to be even more careful because has commonly been
Drats! ...because _what_ has..., of course. Talk about being careful.
called unevaluated expressions cover symbols and constants too.
I.e., quote(1) and quote(x) are not calls. And
On 9/14/06, Prof Brian Ripley [EMAIL PROTECTED] wrote:
On Thu, 14 Sep 2006, Deepayan Sarkar wrote:
[...]
Ah, I'd forgotten about parse. A link from ?expression might be reasonable.
But it says
Details:
'Expression' here is not being used in its colloquial sense, that
of
A quick question, please.
x = c(0.0001, 0.0059, 0.0855, 0.9082)
y = c(0.54, 0.813, 0.379, 0.35)
where A = 1st set, B = 2nd set, C = 3rd set, D = 4th set respectivley.
How do you make hist plot side by side for x y?
i.e. 0.0001 and then to the right 0.54, 0.0059 and then to the right 0.813,
On 9/14/2006 5:26 PM, Mark Pinkerton wrote:
Hi Duncan,
I had also validated the logic with a simple test which is why I was
surprised by the differences I was seeing from tthe more complex simulation.
I am running R on a Windows 2000 - I'll have to check which version at my
desk tomorrow
Dear RUsers,
I am new to R. I am learning how to use R. I am a PC user and run R on
windows. I would appreciate if some one could guide me on a few questions I
have:
1) I have 4 cel files (2 replicates for NORM and Disease resp). I have been
able to run siggenes on this dataset where I have 4
On Thu, 2006-09-14 at 19:37 -0400, Ethan Johnsons wrote:
A quick question, please.
x = c(0.0001, 0.0059, 0.0855, 0.9082)
y = c(0.54, 0.813, 0.379, 0.35)
where A = 1st set, B = 2nd set, C = 3rd set, D = 4th set respectivley.
How do you make hist plot side by side for x y?
i.e. 0.0001
hi--
I am new to R and try to use R cluster my binary data. I use
hierarchical clustering
plot (hclust (dist(x,method=binary),method=average),cex=0.1)
I end up with a cluster Dendrogram. On the left of my dendrogram, there
is scale called Height from 0.0 to 1.0.
I don't understand what does
Emmanuel,
I wouldn't be surprised if Gabor comes up with something, but since
aggregate() can only return scalars, you can't do it in one step here.
There are possibilities using other functions such as split(), tapply()
or by(), but each has it own respective limitations requiring more than
one
Read the help desk article in R News 4/1.
On 9/14/06, Richard Evans [EMAIL PROTECTED] wrote:
Dear R-forum,
I am looking for a good resource/help on working with POSIXct values and
controlling the pretty x-axis labels and tick marks for a data VS time
plots. Specifically, I wish to do
I have a table:
C1
RowName13
RowName22
and another table:
C2
RowName15.6
RowName1a 4.3
RowName2NA
I want to join join the tables with matching rows:
C1 C2
RowName1 3
Here are three different ways to do it:
# base R
fb - function(x)
c(V1 = x$V1[1], V4 = x$V4[1], V2.mean = mean(x$V2),
V3.mean = mean(x$V3), n = length(x$V1))
do.call(rbind, by(DF, DF[c(1,4)], fb))
# package doBy
library(doBy)
summaryBy(V2 + V3 ~ V1 + V4, DF, FUN = c(mean, length))[,-5]
Hi, Russell,
Here is a piece of code and you might need to tweak it a little.
MERGE 2 DATA FRAMES###
# MERGE 2 DATA FRAMES:#
# INNER JOIN, LEFT JOIN, RIGHT JOIN, #
# FULL JOIN, CARTESIAN PRODUCT #
###
thx so much, Marc.
ej
On 9/14/06, Marc Schwartz [EMAIL PROTECTED] wrote:
On Thu, 2006-09-14 at 19:37 -0400, Ethan Johnsons wrote:
A quick question, please.
x = c(0.0001, 0.0059, 0.0855, 0.9082)
y = c(0.54, 0.813, 0.379, 0.35)
where A = 1st set, B = 2nd set, C = 3rd set, D = 4th set
Hi!
I don't understand this:
layout(matrix(c(1:10),5,2),heights=c(1,rep(2,4)))
plot(1,1)
error in plot.new() : plot region too large
Why??
Thanks!
Kamila
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
The figure margins come from what is set in par(mar), eg
layout(matrix(c(1:10),5,2),heights=c(1,rep(2,4)))
par(mar)
[1] 5.1 4.1 4.1 2.1
There is not enough space left to plot anything with those margins. You
will need to make them smaller first, e.g.
par(mar=c(1,1,1,1,))
plot(1,1)
In
57 matches
Mail list logo