Hi, I am using the scatter3d function in Rcmdr to plot
the first 3 principal components, I have a grouping
variable of 2 groups, and tried to plot points with
different colors, somehow I couldn't change the
default colors of the 2 groups (blue and green)by
using option points.col=c('red','blue'),
Hi, is there any package/function that can tell if a
numeric vector (continuous data) has a bimodal or
trimodal distribution and caluclate the location of
the corresponding modes?
Thanks
__
R-help@stat.math.ethz.ch mailing list
Hi, I found that when writing a matrix with row names
and column names to an Excel file, the Excel file when
opened has column names shifted towards left resulting
disalignment. Here is an exmaple
x-matrix(1:20,nrow=4,dimnames=list(paste('r',1:4,sep=''),paste('c',1:5,sep='')))
:
dat-cbind(disease=sample(c(rep(1,15),rep(0,20))),test1=sample(c(rep(1,11),rep(0,24))),test2=sample(c(rep(1,14),rep(0,21
Hope some statistical experts would guide me some
directions. Many thanks
--- array chip [EMAIL PROTECTED] wrote:
Hi there, is there any way to compare 2 odds ratios?
I
Hi there, is there any way to compare 2 odds ratios? I
have two tests that are supposed to detect a disease
presence. So for each test, I can compute an odds
ratio. My problem is how can I compare the 2 tests by
testing whether the 2 odds ratios are the same?
Appreciate
Hi there, is there any way to compare 2 odds ratios? I
have two tests that are supposed to detect a disease
presence. So for each test, I can compute an odds
ratio. My problem is how can I compare the 2 tests by
testing whether the 2 odds ratios are the same?
Appreciate
Hi how can I plot a series of number as a line, but
with lines above a threshould as one color, and with
lines below the threshold as another color. for
example, a numeric vector: rnorm(1:100), and plot
these numbers in the original order, but lines above
the horizontal line at 0 are in red, and
I haven't heard from anyone with my previous post. I
guess I should post my dataset and my code here:
The dataset has one factor as treatment with 4 levels
(treatment1, treatment2, treatment3 and control), and
another factor as time (36 time points). On average
Each treatment group has 10
Hi, I have a simple dataset with repeated measures.
one factor is treatment with 3 levels (treatment1,
treatment2 and control), the other factor is time (15
time points). Each treatment group has 10 subjects
with each followed up at each time points, the
response variable is numeric, serum protein
Hi there, I encountered a weird problem using cph()
with Design package:
I have 2 datasets, say dat1 and dat2, both data
frames with 3 columns time,status and scores,
all numeric
If I run the following:
dd-datadist(dat1)
options(datadist='dd')
dd
time status scores
sorry this problem only occurs in S-Plus, not in R.
--- array chip [EMAIL PROTECTED] wrote:
Hi there, I encountered a weird problem using cph()
with Design package:
I have 2 datasets, say dat1 and dat2, both data
frames with 3 columns time,status and scores,
all numeric
If I run
Thanks for the suggestion! what if the dimensions of
the table is greater than 2, say 3x4?
--- Prof Brian Ripley [EMAIL PROTECTED] wrote:
On Wed, 1 Feb 2006, array chip wrote:
Hi, is there a way to generate the table's
probability
when doing the fisher's exact test on a 2x2 table
)
tmp-tmp-lgamma(x[i,j]+1)
}
}
tmp-tmp-lgamma(sum(x)+1)
exp(tmp)
}
--- Prof Brian Ripley [EMAIL PROTECTED] wrote:
On Thu, 2 Feb 2006, array chip wrote:
Thanks for the suggestion! what if the dimensions
of
the table is greater than 2, say 3x4?
Look at the references quoted
Does anyone know how I can generate a 2x2 table in a
format where in each cell of the table, it contains a)
count (frequency) b) total percentage c) row
percentage d) column percentage. SAS can generate this
format easily, is there a R package that can do this?
Frequency |
Percent |
Row Pct |
Hi, is there a way to generate the table's probability
when doing the fisher's exact test on a 2x2 table? The
fisher's exact test gives the p value, but not the
probability for the table.
__
R-help@stat.math.ethz.ch mailing list
You can change the language setting during the
installation, it is just not that obvious though.In
the selection components step of installation,
uncheck the message translations.It should be OK
then.
--- Ariel Bergamini [EMAIL PROTECTED] wrote:
Hi
I just installed R 2.2.0 on Windows 2000. I
Hi, I am trying to make my axis labels left justified,
and have used adj=0 in the axis() without success. Can
anyone have a suggestion?
axis(2,at=1:50,labels=paste('a',1:50,sep=''),las=2,cex.axis=0.5,adj=0,tck=0,mgp=c(3,0.5,0))
Thanks
__
Romain,
Thanks for the code. It worked perfectly!
--- Romain Francois [EMAIL PROTECTED] wrote:
Le 11.08.2005 00:59, array chip a écrit :
Thanks for the suggestion! It works in a way that
the
entire graph window is in the background color, is
there a way to only have the plotting area
Hi, I am using image() function to plot a matrix which
has some missing valuies (NA). It looks like, by
default, missing values were drawn in white color, How
can I change that into a different color, say a gray
color? I tried to use bg='gray' argument with no luck.
Anyone has a suggestion?
Thanks for the suggestion! It works in a way that the
entire graph window is in the background color, is
there a way to only have the plotting area (i.e. the
area within the axis box in the background color, but
leave the area outside the axes to be unchanged
(white)?
Thanks!
--- Prof Brian
PROTECTED] wrote:
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
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
Hi, is it possible to increase the memory limit to
infinite so that I don't need to worry about whether
it is enough or not? In S-plus, you can do this by
setting:
options( memory = as.integer( Inf ) )
is it possible to do this in R?
__
Hi all,
I have dataset with 2 independent variable, one (x1)
is continuous, the other (x2) is a categorical
variable with 2 levels. The dependent variable (y) is
continuous. When I run linear regression y~x1*x2, I
found that the p value for the continuous independent
variable x1 changes when
Hi all,
In Tibshirani's PNAS paper about nearest shrunken
centroid analysis of microarrays (PNAS vol 99:6567),
they used cross validation to choose the amount of
shrinkage used in the model, and then test the
performance of the model with the cross-validated
shrinkage in separate independent
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of array chip
,]
predict(obj2,type='probs')[1:5,]
appreciate any suggestions!
--- John Fox [EMAIL PROTECTED] wrote:
Dear chip,
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of array chip
Sent: Thursday, April 14, 2005 1:00 PM
To: John Fox
Cc: R-help
Hi,
I found that using different contrasts (e.g.
contr.helmert vs. contr.treatment) will generate
different fitted probabilities from multinomial
logistic regression using multinom(); while the fitted
probabilities from binary logistic regression seem to
be the same. Why is that? and for
Hi,
Just wonder if someone could comment on using linear
discriminant analysis (LDA) vs. multinomial logistic
regression in multi-class classification/prediction
(nomial dependent variable, not ordinal)? What kind of
difference in results can I expect from the 2 methods,
which is better or more
Hi,
I understand bootstrap can be used to estimate 95%
confidence interval for some statistics, e.g.
variance, median, etc. I have someone suggesting that
by resampling certain proportion of the total samples
(e.g. 80%) without replacement, we can also get the
estimate of confidence intervals.
Hi,
I am just a little confused of mian effect in the
analysis of variance (ANOVA) when you include or do
not include an interaction term. Let's assume a simple
case of 2-way ANOVA with 2 factors A and B, each with
2 levels. If it shows that main effect for A is
significant when the interaction
Hi all,
I encountered a weird problem when using the
Design and Hmisc libraries in S-Plus (it worked well
in R). I have a data frame called b, which
has 3 columns: time, status and
scores, a sample of the data frame is like:
data frame b:
time status scores
1 27 0 -126.7
2 24 0
Hi, I encountered a weird problem when using the
Design and Hmisc problem. I have 2 data frame called
a and b, both have 3 columns: time, status and
scores, a sample of the data frame is like:
data frame a:
time status scores
1 21 1 99.61
2 38 0 101.11
3 51 0 100.62
4
105 0 -138.4
167 166 0 -128.8
168 140 0 -114.2
169 163 0 -117.0
170 141 0 -115.8
please advise!
--- array chip [EMAIL PROTECTED] wrote:
Hi, I encountered a weird problem when using the
Design and Hmisc problem. I have 2 data frame called
a and b, both have 3
PROTECTED] Behalf
Of array chip
Sent: Tuesday, December 14, 2004 4:28 PM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [R] Re: [S] using Hmisc and Design
library
actually data frame b has 177 rows, the script
ran
ok on the first 166 rows as a subset, but started
to
break down
suppose I have a factor with 4 levels:
'a','b','c','d'. I would like to do analysis of
variance using aov() with the factor as independent
variable. How can I specify the level b as the
reference level just like the level a would be the
reference level if using contr.treatment as the
contrast?
Hi,
I wrote a function that worked well in R, but not in
S-Plus, can anyone suggest a solution?
f.coxph.zph-function(x)
{
cox.fit - coxph(Surv(time.cox, status.cox) ~ x,
na.action = na.exclude, method = breslow)
fit.zph-cox.zph(cox.fit,transform='log')
fit.zph$table[,3]
it?
Thanks
--- Thomas Lumley [EMAIL PROTECTED] wrote:
array chip wrote:
Hi,
How can I specify a Cox proportional hazards
model
with a covariate which i believe its strength on
survival changes/diminishes with time? The value
of
the covariate was only recorded once
Hi,
How can I specify a Cox proportional hazards model
with a covariate which i believe its strength on
survival changes/diminishes with time? The value of
the covariate was only recorded once at the beginning
of the study for each individual (e.g. at the
diagnosis of the disease), so I do not
Hi,
Is there a way to specify proior probability in
multinom()? The function has a weight option for
individual cases, but I would like to specify prior
probability for each category of the response
variable, just like what lda() does. My data have
categorical independent variables, so I think
Hi,
Is there a way to specify proior probability in
multinom()? The function has a weight option for
individual cases, but I would like to specify prior
probability for each category of the response
variable, just like what lda() does. My data have
categorical independent variables, so I think
Hi, how can I do multinomial logistic regression in R?
I think glm() can only handle binary response
variable, and polr() can only handle ordinal response
variable. how to do logistic regression with
multinomial response variable?
Thanks
__
Y!
Hi,
I am wondering how to specify interval-censored data
in coxph? The example in the help page
summary(coxph(Surv(start, stop, event) ~ x, data =
test2))
is for counting process data, is the counting process
data the same as interval-censored data?
Thanks
Hi, not sure if this is the best place to ask this
statistical question, but here it goes:
Does doing survival analysis mandatorily require
consecutively recruited patients? If I have a
retrospective patient sample, but not consecutively
recruited, does it necessitate invalidity of the use
of
Hi, how can I make the character label of the axes of
a plot darker (bolder), but not in a larger size?
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Hi,
not sure if this is kind of question that should be
asked here, but here it is:
I am trying to access R installed on a remote cluster
(Linus), but I got the error message that R command
not found when I simply typed R after the prompt
after having successfully accessed the remote cluster
Hi everyone,
I am fitting a cox proportional hazard model with a
continuous variable x as the covariate:
fit-coxph(Surv(time, status)~x)
Now I wanted to make a plot of survival probability
vs. the covariate, and the 95% confidence interval for
the survival probability. It's just like a
Hi all,
When I use lda for discriminant analysis, should I
normalized my data (variables) to mean 0, variance 1
before running lda if my variables might not be
exactly on the same scale? I have this question
because in principle component analysis, this is
indeed an issue where we can choose
Hi,
I have a question about using lme and aov for the
following dataset. If I understand correctly, using
aov with an Error term in the formula is equivalent
to using lme with default settings, i.e. both assume
compound symmetry correlation structure. And I have
found that equivalency in the
learning
process. -- George E.P. Box
-Original Message-
From: array chip [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 12:42 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [S] lme vs. aov with Error term
Hi,
I have a question about using lme
Jose,
Thank you very much for the explanation!
what about if I specify using ML instead of REML
in the lme? I found that I still got different answers
even I use ML in the lme call. And in any case,
should I trust lme more than aov, or vice versa?
Thanks again
--- [EMAIL PROTECTED] wrote:
Hi,
I have a question about using lme and aov for the
following dataset. If I understand correctly, using
aov with Error term in the formula is equivalent to
using lme with default settings, i.e. both assume
compound symmetry correlation structure. And I have
found that equivalency in the past.
). In
other words, the only thing you will gain is a
smaller 'xxx' object.
Best wishes
Henrik Bengtsson
Lund University
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Thomas
W Blackwell
Sent: den 9 september 2003 01:28
To: array chip
has 1G as well and my problem was a
numeric
matrix that was 5000 square. So you should have no
problem.
Patrick Burns
Burns Statistics
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and A Guide for the Unwilling S
User)
array chip wrote:
Hi
Hi,
I am running a loop to plot multiple plots. In s-plus,
it shows multiple pages in the graphic window to allow
checking on each plot. but in R, the next plot always
overwrite the previous one, so i can only have the
last plot produced, is there a way to have multiple
pages in the graphic
Hi, this following problem is a S-Plus problem, I know
many guys here are also experts in S-plus, so I am
posting here, too.
Thanks
I encountered a weird problem of fitting nls inside a
loop, it works well in R, but not in S-plus. The code
is:
Hi, I am trying to fit a 4-parameter logistic model to
my gradient data using nls. I tried to specify the
model directly in the nls formula and also tried to
use the self-start function SSfpl. For the following
data, the first method worked, but the second didn't.
I thought both ways were
Hi,
I used princomp for PCA analysis based on
correlation matrix (cor=T). I would like to reproduce
the scores for each observation by first standardizing
the data matrix (mean=0, std err=1), and then
multiplied by the loadings of each variable for each
principle components. I get very close
Hi, is there a package for performing leave-one-out
cross validation in R?
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Hi,
I encountered a problem when I am trying to write my
own function which contains another function. To
simplify a problem, I tried the following simplified
function, hope someone can idenfity the problem for
me.
I have a simple data frame called testdata as
following:
, array chip wrote:
Hi,
I encountered a problem when I am trying to write
my
own function which contains another function. To
simplify a problem, I tried the following
simplified
function, hope someone can idenfity the problem
for
me.
snip
f.fun(var='x',fdata=testdata
,
'') in the loop (where i is the index of the
loop).
If I'm writing a function to be used by others, I
might use try, as
described, e.g. in Venables and Ripley (2000) S
Programming (p. 48).
hth. spencer graves
array chip wrote:
Hi, I am running cox regreesion (coxph) on a large
Hi,
it seems that the lda function in MASS library doesn't give out the constant for the
linear discriminant function under the situation that we don't use standardized
variable, anyone knows how to obtain the constant in order to construct the linear
discriminant function?
I understand that
63 matches
Mail list logo