This is two tests: Whether the slope != 1 and whether the intercept != 0.
To do this, include an offset in your model:
fit - lm(y ~ x + offset(x), data=dat)
HTH,
Simon.
At 03:44 PM 3/08/2005, [EMAIL PROTECTED] wrote:
Dear there,
I am wondering how to test whether a simple linear regression
Am 3 Aug 2005 um 7:52 hat Bernd Weiss geschrieben:
[..]
Sorry, I forgot to mention which R version I am using:
version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
The eigenvalues are the squares of the singular values (although you need
to watch the scalings used, in particular n vs n-1). (This is standard
theory.)
Since both are non-negative, given one you can get the other.
On Tue, 2 Aug 2005, Sundar Dorai-Raj wrote:
Rebecca Young wrote:
Hello,
On Tue, 2005-08-02 at 19:06 -0700, Rebecca Young wrote:
Hello,
Can you get eigenvalues in addition to eigevectors using prcomp? If so how?
I am unable to use princomp due to small sample sizes.
Thank you in advance for your help!
Rebecca Young
Rebecca,
This answer is similar as some
On Wed, 3 Aug 2005, Simon Blomberg wrote:
This is two tests: Whether the slope != 1 and whether the intercept != 0.
Neither model given has an intercept
To do this, include an offset in your model:
fit - lm(y ~ x + offset(x), data=dat)
but no intercept, so use
summary(lm(y ~ 0 + x +
Hi,
I suggest to give a look to:
Practical Regression and Anova using R by Julian
Faraway
http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf
http://www.stat.lsa.umich.edu/~faraway/book/
see also package faraway for datasets:
On Wed, 3 Aug 2005, Bernd Weiss wrote:
I am trying to replicate some multilevel models with binary outcomes
using R's lmer and glmmPQL and Stata's gllmm, respectively.
That's not going to happen as they are not using the same criteria.
The data can be found at
On Tue, 2 Aug 2005, Marco Blanchette wrote:
I am still forging my first arms with R and I am fighting with regexpr() as
well as portability between unix and windoz. I need to extract barcodes from
filenames (which are located between a double and single underscore) as well
as the directory
hi all
a very simple question once again!!!
can we change the y range in a histogram?
e.g.
x=rnorm(1000)
hist(x,ylim=0.5,prob=T) #this does not work
any suggestions???__
R-help@stat.math.ethz.ch mailing list
Le 03.08.2005 09:53, Clark Allan a écrit :
hi all
a very simple question once again!!!
can we change the y range in a histogram?
e.g.
x=rnorm(1000)
hist(x,ylim=0.5,prob=T)#this does not work
any suggestions???
That does work :
R hist(x,ylim=c(0,0.5),prob=T) # that does work
Hallo
a very simple answer as well
hist(x,ylim=c(0,0.5),prob=T) #this does work
Cheers
Petr
from help page:
xlim, ylim: the range of x and y values with sensible defaults. Note
^^
that 'xlim' is _not_ used to define the histogram (breaks),
but only
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hello
First, thanks for the help for an earlier question about error handling!
I have problem filtering a dataset.
I'm trying to filter the data in the y columns based on the values in the x
column, e.g.:
x y1y2yn
1.0 1 NA 3
On Wed, 3 Aug 2005, Bernd Weiss wrote:
I am trying to replicate some multilevel models with binary outcomes
using R's lmer and glmmPQL and Stata's gllmm, respectively.
That's not going to happen as they are not using the same criteria.
the glmmPQL and lmer both use the PQL method to do it ,so
Also see function rocdemo.sca in the ROC package.
The area under the 45 degree line in an ROC curve has an area of 0.5.
Regards, Adai
On Tue, 2005-08-02 at 09:24 -0400, Ravi Varadhan wrote:
Hi,
To find the area lying between the curve y = y(x) and 45 degree line (which,
assuming it goes
1) You need to simplify your codes a bit and show people how the input
might look like if you want useful responses. Perhaps a small
reproducible example or brief description of what you are trying to do
might help. See the posting guide for more details.
2) I am guessing here but are you
Why not use an editor ?
I would highly recommend Emacs in combination with Emacs Speaks
Statistics (ESS). Section 2.1 of [1] might help with the installation.
Otherwise you can try JGR [2] or others [3]. There is a R special
interest group for MAC users [4] that you can try.
[1]
Adaikalavan Ramasamy [EMAIL PROTECTED] writes:
Why not use an editor ?
I would highly recommend Emacs in combination with Emacs Speaks
Statistics (ESS). Section 2.1 of [1] might help with the installation.
Otherwise you can try JGR [2] or others [3]. There is a R special
interest group
You can compute MD5 and SHA1 digests with the 'digest' package.
-roger
Adrian Baddeley wrote:
Can anyone suggest a simple way to calculate a 'hash code'
from an arbitrary R object?
hash(x) should return an integer or string
with the property that
if hash(x) != hash(y) then x and y
Dear all,
I have a list containing 150 simulated datasets in R. Is there a way to
convert it to the Stata format such that I will be able to apply some Stata
functions on each dataset in the list?
Thank you in advance,
Vicky Landsman.
__
Dear R users,
I'm attempting to fit a GLM with random effects using the tweedie family
for the error structure. I'm getting the error:
iteration 1
Error in logLik.reStruct(object, conLin) :
NA/NaN/Inf in foreign function call (arg 3)
I'm running V2.1.0
I notice from searching the
Dear R users, please can you help me understand the behaviour of abline using
function lm.
I'm trying to learn linearity over groups. So I make three groups with 10
values each:
test=data.frame(cbind(
l=c(rnorm(10,0,30),rnorm(10,100,30),rnorm(10,200,30)),
t = c(rep(0,10), rep(1,10),
Thanks. It is now working as I wanted, if I use (simplified)
test-function(formula, data, w){
wname - deparse(substitute(w))
w - if(wname %in% names(data)) data[[wname]] else get(wname, .GlobalEnv)
data$w-w
glm1-glm(formula=formula,data=data, weights=w)
.
}
What I was looking for
?abline
and you can see
...
'reg' is a regression object which contains 'reg$coef'. If it is
of length 1 then the value is taken to be the slope of a line
through the origin, otherwise, the first 2 values are taken to be
the intercept and slope.
...
and
plot(test$l~test$t)
Hello,
I'm tring to make a linear discriminant analysis eith lda (MASS).
In the value of the resulting object is there information about the value of
the centroids of the discriminated group for the discriminant functions?
Thank you in advance for your help!
Leonardo
--
Leonardo Lami
[EMAIL
Dear all,
As an update to my previous post, for anyone who is interested: Someone
has kindly told me that this error does not occur in the 2.2 pre-release
version. I've run my particular model with my data and this problem is
solved in the 2.2 pre-release.
Cheers,
Kechi Nzerem
-Original
Hi all,
I'm trying to build R 2.1.1 on Ubuntu 5.04 i686-SMP. Configure goes well
with:
./configure --with-BLAS --with-readline=no
but once I run 'make', I get the following error:
In file included from devX11.c:64:
devX11.h:57:74: X11/Intrinsic.h: No such file or directory
Any ideas?
Hi all,
I'm trying to build R 2.1.1 on Ubuntu 5.04 i686-SMP. Configure goes well
with:
./configure --with-BLAS --with-readline=no
but once I run 'make', I get the following error:
In file included from devX11.c:64:
devX11.h:57:74: X11/Intrinsic.h: No such file or directory
Any ideas?
My favorite syntax error for such situations is [}, but as Peter
said, that won't work if you are in the middle of a quote. Then one
might try '[}'. If that failed, '[} should work.
Thanks, Peter.
spencer graves
Peter Dalgaard wrote:
Adaikalavan
On Wed, 3 Aug 2005, Vicky Landsman wrote:
Dear all,
I have a list containing 150 simulated datasets in R. Is there a way to
convert it to the Stata format such that I will be able to apply some Stata
functions on each dataset in the list?
For Stata your best best is probably to stack all
But those two lines are almose identical The difference between i=0.4432,
s=104.1688 and i=0.8776,s=108.1313 is almost negligible.
What I see is that abline draws a line with a v.similar slope but intercept is
about 90 instead of 0.8776. Try running the example to see what I mean.
ronggui
x - data.frame(q33a=3:4,q33b=5:6,q35a=1:2,q35b=2:1)
y - list()
for (i in grep(q33, colnames(x), value=TRUE))
+y[[sub(q33,,i)]] - ifelse(x[[sub(q33,q35,i)]]==1, x[[i]], NA)
as.data.frame(y)
a b
1 3 NA
2 NA 6
# if you really want to create new variables rather
# than have them
Hello Bing Ho,
This is a shame to me: I have not fixed yet all incompatiblities between
R 2.1.X, Rcmdr 1.X and SciViews-R. I know all these bugs and I am
working on them. I just add today to the
http://www.sciviews.org/SciViews-R page that the current version of
SciViews-R is only compatible
Le 03.08.2005 18:23, Jake Michaelson a écrit :
I'm working on some heatmaps, and the person I'm working with would
prefer a red-black-green color palette (red denoting gene induction and
green denoting gene repression). Does such a palette exist already?
If not, is there an easy way to
On Wed, 3 Aug 2005, Jake Michaelson wrote:
Hi all,
I'm trying to build R 2.1.1 on Ubuntu 5.04 i686-SMP. Configure goes well
with:
./configure --with-BLAS --with-readline=no
but once I run 'make', I get the following error:
In file included from devX11.c:64:
devX11.h:57:74:
I thought setting keep.data=FALSE might help, but running this on a 32-bit
Linux machine, the R process seems to use 1.2 GB until just before clara
returns, when it increases to 1.9 GB, regardless of whether keep.data=FALSE
or TRUE. Possibly it's the overhead of the .C() interface, but that's
Nestor == Nestor Fernandez [EMAIL PROTECTED]
on Wed, 03 Aug 2005 18:44:38 +0200 writes:
Nestor I'm trying to estimate clusters from a
Nestor very large dataset using clara but the program stops
Nestor with a memory error. The (very simple) code and the
Nestor error:
R quits with the message above?
What is the cause of the message and how can I avoid this?
I am using R.2.1.0 on a debian box.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Good evening, I am Marta Colombo, student of the Politecnico in Milan and I'm
looking for some help.I'd like to know how I can see R-Squared using loess
because in the output there are only:
number of observations
equivalent number of parameters
residual standard error
and even looking at the
List gurus,
I'm trying to code a Gompertz growth curve function as part of a larger
project and have run across a problem due to my ignorance of
environments. Some sample data and the function are as follows:
growth - data.frame(age = c(1.92, 3, 5.83, 3.17, 15.5, 1.17, 5.58,
13.33, 14.29,
Jake Michaelson wrote:
I'm working on some heatmaps, and the person I'm working with would
prefer a red-black-green color palette (red denoting gene induction and
green denoting gene repression). Does such a palette exist already?
If not, is there an easy way to create one?
See
Hi, Anders/Dimitris,
Dimitris Rizopoulos wrote:
maybe you could consider something like this:
dat - data.frame(x = c(1, 2, 2, 3, 3, 4),
y1 = c(1, 1, 2, 1, 7, 8),
y2 = c(NA, NA, NA, 5, 5, 4),
y3 = c(3, 11, NA, 16, 2, 1))
#
Eric Archer wrote:
List gurus,
I'm trying to code a Gompertz growth curve function as part of a larger
project and have run across a problem due to my ignorance of
environments. Some sample data and the function are as follows:
growth - data.frame(age = c(1.92, 3, 5.83, 3.17, 15.5,
Most excellent Sundar! Thanks so much!
Cheers,
e.
Sundar Dorai-Raj wrote:
Eric Archer wrote:
List gurus,
I'm trying to code a Gompertz growth curve function as part of a
larger project and have run across a problem due to my ignorance of
environments. Some sample data and the
Dear list,
I try to update the prabclus package.
R CMD check works nicely, no warnings, good results in all tests.
However, building the package fails:
ginkgo:/disk5/home/chrish/RAusw/libsrc R CMD build prabclus
* checking for file 'prabclus/DESCRIPTION' ... OK
* preparing 'prabclus':
* checking
I have a large vector of around 12597 elements and I wish to calculate
p-value for each element using a formula of something like:
p-value= 1- exp^(kexp^(-labda))
I was wondering someone could give some ideas how to implement for each element.
thankyou very much
Rangesh.K
You can do the following without resorting to a hard coded loop
sapply( paste(q35, letters[1:grep(r, letters)], sep=), function(x)
ifelse(temp[, x]%in%1,temp[, sub(5, 3, x)],NA)
as the following example shows
temp - matrix(sample(c(0,1), 360, replace=T), nrow=10)
colnames(temp) - c(paste(q33,
if labda is the elements of the vector and you know what kexp is , you can
use apply
apply(your_vector, 1, function(x) 1- exp^(kexp^(-x)))
HTH
Jean
On Wed, 3 Aug 2005, Rangesh Kunnavakkam wrote:
I have a large vector of around 12597 elements and I wish to calculate
p-value for each
On Wed, 3 Aug 2005, Omar Lakkis wrote:
R quits with the message above?
'R quits'? What exactly happens? -- please see the posting guide.
What is the cause of the message and how can I avoid this?
I am using R.2.1.0 on a debian box.
Which platform (please see the posting guide)?
I guess it
Has any developed or is anyone developing a plug-in[1] for using R
with Eclipse[2]?
Eclipse is an Integrated Development Environment (IDE) written in
Java. While originally used as an IDE for Java, it has become an
nice environment for developing and testing in other languages, too,
Hi, there:
I am wondering what packages are available in R which can do outlier
detection in large-scale dataset.
Thanks for sharing info,
weiwei
--
Weiwei Shi, Ph.D
Did you always know?
No, I did not. But I believed...
---Matrix III
__
Rangesh Kunnavakkam wrote:
I have a large vector of around 12597 elements and I wish to calculate
p-value for each element using a formula of something like:
p-value= 1- exp^(kexp^(-labda))
I was wondering someone could give some ideas how to implement for each
Greetings all,
Our group[1] is seeking to hire three programmers to work on various
aspects of Bioconductor as well as other projects within the
Computational Biology group at the Fred Hutchinson Cancer Research
Center.
Here is a brief description of each position with a link for more
info.
Hi,
I tried to do a logistic regression with polr(MASS). I
thought I already converted the response to factor,
but obvious I was wrong. Could anyone tell me what I
did wrong and how to correct it? Thank you very much!
Lease=read.csv(LeaseDummy.csv, header=TRUE)
Lease$ID -
I am trying to calculate the weighted mean for a of 10 deciles and I
get an error:
decile - tapply(X=mat$trt1m, INDEX=mat$Rank, FUN=weighted.mean, w=mat$mcap)
Error in FUN(X[[1]], ...) : 'x' and 'w' must have the same length
All three of my inputs have the same length, as shown below, and the
Dear list,
can someone tell me why this two pieces of code give me the same
results?
for(i in 0:5){ sum[i] = i }
sum
[1] 1 2 3 4 5
for(i in 1:5){ sum[i] = i }
sum
[1] 1 2 3 4 5
shouldn't the first one be
0 1 2 3 4 5
thank you,
simone
__
Simone Gabbriellini [EMAIL PROTECTED] writes:
Dear list,
can someone tell me why this two pieces of code give me the same
results?
for(i in 0:5){ sum[i] = i }
sum
[1] 1 2 3 4 5
for(i in 1:5){ sum[i] = i }
sum
[1] 1 2 3 4 5
shouldn't the first one be
0 1 2 3 4 5
No.
On Wed, 2005-08-03 at 23:24 +0200, Simone Gabbriellini wrote:
Dear list,
can someone tell me why this two pieces of code give me the same
results?
for(i in 0:5){ sum[i] = i }
sum
[1] 1 2 3 4 5
for(i in 1:5){ sum[i] = i }
sum
[1] 1 2 3 4 5
shouldn't the first one be
0 1
Hint: help.search() - An Introduction to R - Simple manipulations
numbers and vectors - ...
spencer graves
Peter Dalgaard wrote:
Simone Gabbriellini [EMAIL PROTECTED] writes:
Dear list,
can someone tell me why this two pieces of code give me the same
results?
for(i in 0:5){ sum[i] =
roger bos wrote:
I am trying to calculate the weighted mean for a of 10 deciles and I
get an error:
decile - tapply(X=mat$trt1m, INDEX=mat$Rank, FUN=weighted.mean, w=mat$mcap)
Error in FUN(X[[1]], ...) : 'x' and 'w' must have the same length
All three of my inputs have the same length,
how can I have a 0 evaluated in my loop then?
it is important for my algorithm
do you have any hints?
simone
Il giorno 03/ago/05, alle ore 23:37, Marc Schwartz ha scritto:
On Wed, 2005-08-03 at 23:24 +0200, Simone Gabbriellini wrote:
Dear list,
can someone tell me why this two pieces of
It would help to have an example of what it is you are trying to do.
Importantly, keep separate the need to have zero be a value in a vector
as opposed to using zero to index a vector.
As I note below in my reply, you can have:
x - 0:5
x
[1] 0 1 2 3 4 5
x ^ 2
[1] 0 1 4 9 16 25
Marc
Random forest can do the job.
HTH.
On 8/3/05, Weiwei Shi [EMAIL PROTECTED] wrote:
Hi, there:
I am wondering what packages are available in R which can do outlier
detection in large-scale dataset.
Thanks for sharing info,
weiwei
--
Weiwei Shi, Ph.D
Did you always know?
No, I did
Folks:
(This is a question on the formal S4 class system). R 2.1.1 on Windows.
I'm pretty sure the following is a failure of my understanding, rather than
a bug, so may I ask for some clarification?
The Green book states that (p. 295) Objects are checked for validity when
permanently assigned,
Dear List,
Is there any function in R to generate multivariate F distribution with
given correlation/covariance matrix?
Actually, I just want to generate some 2-dimentional non-normal data
sets (skewed) for low (may be around 0.3 cor coeff.) negatively and also
positively correlated variables
Note that we can omit the second argument to substitute as
in this case since they will be given by the default.
On 8/3/05, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Eric Archer wrote:
List gurus,
I'm trying to code a Gompertz growth curve function as part of a larger
project and
Why are you adding as.integer before the factor statement? You are forcing
the variable to be an integer even tough you are passing factor within the
statement. Try
Lease$ID -factor(Lease$EarlyTermination)
Cheers
Francisco
From: Haibo Huang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject:
Hi, I have a matrix with both positive and negative
numbers, I would like to use image() to draw a
heatmap. How can I can design a palette (or is there a
function already available) that treat negative
numbers in a blue gradient and positive numbers in a
red gradient and treat 0 as white?
Thanks
On Wed, 3 Aug 2005, array chip wrote:
Hi, I have a matrix with both positive and negative
numbers, I would like to use image() to draw a
heatmap. How can I can design a palette (or is there a
function already available) that treat negative
numbers in a blue gradient and positive numbers in a
I think ronggui is right and your example is just a coincidence. Here is
my example in which case the intercept is hugely different
(with slightly different style of coding).
set.seed(1) # for reproducibility
y - c( rnorm(10, 0, 30), rnorm(10, 100, 30), rnorm(10, 200, 30) )
x - rep(
Dear all.
I have found one more minor bug in the Lattice package.
When xyplot plots several curves on each panel with the default panel
function panel.xyplot, and when it is called with g %in% type
(that is,
xyplot(y1+y2+y3~x|cond,allow.multiple=TRUE,type=c(o,g),other params)
), it draws
Thanks.
I knew rf based on proximity can detect the outlier but when the data
size goes to 1 million and the features go around 200, I guess I
probably do not have enough memory to proceed. Do u have some
experience of outlier detection in this kind of data size?
regards,
weiwei
On 8/3/05,
Hi all, please don't ask me why I tried this but...
I have observed some odd behaviour in the time taken to read a file. I
tried searching the archives without much success, but that could be me.
The first time I read a (60Mb) CSV file, takes a certain amount of time.
The second time
I'm in a situation where I say:
predict(m.rpart, newdata=D[N1+t,])
0 1
173 0.8 0.2
which I interpret as meaning: an 80% chance of 0 and a 20% chance of
1. Okay. This is consistent with:
predict(m.rpart, newdata=D[N1+t,], type=class)
[1] 0
Levels: 0 1
But I'm puzzled at the following.
74 matches
Mail list logo