Hi Nadja
It depends on your purpose. Often people are using tests to show
that a sample follows a distribution (normal, exponential,
lognormal, ...).
If a test rejects the null hypothesis that the sample comes from
the specified distribution, you are on the safe side, since you
are controlling
[R] Backtransforming regression coefficient for scaled covariate
Your
covariate in the second part of the polynomial is x^2 and not x. Therefore
the transformation should be applied to x^2.
Like this:
(lm2 - lm(y ~ scale(x) + I(scale(x^2)) )
then you would use
coef(lm2)[3]/sd(x^2)
Andres
--
Dear R-users,
Is there a way to get p-values for a one-sided hypothesis test about a
poisson mean?
Thanks,
Jan Wijffels
University Center for Statistics
W. de Croylaan 54
3001 Heverlee
Belgium
tel: +32 (0)16 322784
fax: +32 (0)16 322831
http://www.kuleuven.be/ucs http://www.kuleuven.be/ucs
Andres, this seems not to be the case. Look bellow
the coefficients. They are not the same as in unscaled
regression.
R (lm1 - lm(y ~ x + I(x^2)))
Call:
lm(formula = y ~ x + I(x^2))
Coefficients:
(Intercept)x I(x^2)
4.62069 1.78811 -0.00751
R ## Fit
Dear Gregor
The solution of Andres was correct, but by reproducing his
example you did a copy paste error. In the model lm2 you should
scale your variable after the polynomial transformation
I(scale(x^2)) and not I(scale(x)^2)
Then the backtransformation in your example should work.
Regards,
RE: [R] Backtransforming regression coefficient for scaled covariateYep it
is the the same.
Scaling does both dividing and centering (this is the reason intercept
changes) and scaling is not with sd but with sum of squares divided by n-1;
so, it is not s.d. because average is not substracted
But
you could use something like the following (in case of two-group
comparisons make the proper adjustements):
pois.test - function(x, alternative = c(two.sided, less,
greater), mu){
alternative - match.arg(alternative)
if (missing(mu) || (length(mu) != 1 || is.na(mu)))
stop('mu'
Dimitris,
Thanks for the test. But you are using a normal approximation to the
poisson distribution. This is not applicable in my case. I was more
looking for an exact test. Probably based on Garwood's (1936) confidence
interval. If there is already an R implementation available, than this
would
hello
my data is
data2:2743 4678 21427 6194 10286 1505 12811 2161 6853 2625 14542 694
11491 14924 28640 17097 2136 5308 3477 91301 11488 3860 64114 14334
by calculating
shape-(mean(data2))^2/var(data2)
scale-var(data2)/mean(data2)
i get the idea what the parameters of the
Hi
I think that it can work with missing dataset. Where do you try to use
randomForest?
regards
Marco
Jan-Paul Roodbol [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
09/10/2005 08:10 PM
To
[EMAIL PROTECTED]
cc
r-help@stat.math.ethz.ch
Subject
[R-sig-finance] Missing
Does anyone know
In short:
I didn't take enough stats courses in college. Now I am working on scientific
research and I feel somewhat lost when it comes to designing the statistical
framework. I have looked through the books at:
http://www.r-project.org/doc/bib/R-books.html
I even tried to read [17] Julian
There is a Springer publication All of Statistics: a concise course in
statistical inference by Larry Wasserman that might be what you are
looking for. The book also has an emphasis on R and his web site has
code and data sets for analysis of the examples used throughout.
-Harold
-Original
Given that your goal is understanding the fundamentals (a wise choice as it
is problematic attempting to build on an inadequate foundation, and
dangerous to use tools that you don't understand), I enthusiastically
recommend Peter Dalgaard's book, _Introductory Statistics with R_. Springer,
2002.
Doran, Harold wrote:
There is a Springer publication All of Statistics: a concise course in
statistical inference by Larry Wasserman that might be what you are
looking for. The book also has an emphasis on R and his web site has
code and data sets for analysis of the examples used throughout.
I want to add an outer subtitle to my 2x3-plot, but it's distance to the
lowest plots is very high: 6 lines or more?!
If I choose oma=c(5,0,2,0), it lies out of the plotting region and
disapprears. Obviously I make something wrong here. Help appreciated,
Thomas
x=seq(from=1, to=3.5, length=100)
I have a large dataset looking like this (as an example):
doy-c(178,179,180,181,182,183,184,185,186,187,188)
s1-c(0 , 0, 2.4 , 0 , 3.34 , 0 , 5.34 , 0 , 0 , 0 , 6.9)
s2-c(0 , 9.72, 0, 10.56 , 2.67 , 0 , 6.45 ,0 , 0 , 9, 3.6)
dat-cbind(doy,s1,s2)
dat
I need to make a barplot where the two
Thomas Steiner schrieb:
I want to add an outer subtitle to my 2x3-plot, but it's distance to the
lowest plots is very high: 6 lines or more?!
If I choose oma=c(5,0,2,0), it lies out of the plotting region and
disapprears. Obviously I make something wrong here. Help appreciated,
Thomas
2005 APPLIED QUANTITATIVE ANALYTICS IN FINANCE EVENT o OCTOBER 6, 2005 o
LONDON
Please join us at the Museum of London for a series of guru-led
presentations, networking, and demonstrations by academic and business
thought leaders in finance from Basel II Committee, Swiss Union of Raiffeisen
The Wonnacott Wonnacott
http://www.amazon.com/exec/obidos/tg/detail/-/0471615188/qid=1126532904/sr=8-1/ref=pd_bbs_1/104-8196380-9551909?v=glances=booksn=507846
may be of interest
hih
Vincent
__
R-help@stat.math.ethz.ch mailing list
Hi R experts
I have the following regular expression problem. I am writing a basic corpus
retrieval program, i.e. a concordancer/function where a user enters
- a set or a directory of text files to search;
- a regular expression to search for in these files.
I want to provide an output in which
Use ppois(x,lambda), which gives P(X=x) for mean=lambda.
Eg: lower one-sided test for observing no events with mean of 3.4
ppois(0,3.4)
[1] 0.03337327
upper one-sided test for observing 8 events with a mean of 3.4 (need the
-1 to include 8 in the rejection region)
I was in a similar situation-I recommend (Crawley 2005) which I found to be
quite inspiring with many excellent examples.
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470022981.html
Crawley, M. J. 2005. Statistics: An introduction using R. John Wiley Sons
Ltd., Chichester, England.
Hi R-profs,
Maybe my question is a little off topic. Could any one tell me how to
calculate a linear-circular correlation coefficient and its p-values?
I had a quick look at circular and CircStats packages and did not find
the related function.
Thanks for any kindly help.
Xiaohua
--
Xiaohua
Thomas Lumley [EMAIL PROTECTED] writes:
Use ppois(x,lambda), which gives P(X=x) for mean=lambda.
Eg: lower one-sided test for observing no events with mean of 3.4
ppois(0,3.4)
[1] 0.03337327
upper one-sided test for observing 8 events with a mean of 3.4 (need the
-1 to include 8 in
I'm having trouble with the heatmap function in R. When I try and
heatmap something, my graphics window does not open. Does anyone
know if this is a glitch in the version of R that I'm using? I've
listed my version of R below, as well as a simple heatmap command.
I'm running the program on
Jose -
Before implementing SNK and Duncan's, you may want to be aware of some
criticisms of these methods:
From Hsu (1996),
Newman-Keuls multiple range test is not a confident inequalities method and
cannot be recommended.
Duncan's multiple range test is not a confident inequalities method
Does any other plotting function work as they should e.g. plot(1:10) or
are you connecting remotely to a server ?
Regards, Adai
On Mon, 2005-09-12 at 10:51 -0400, Peter Scacheri wrote:
I'm having trouble with the heatmap function in R. When I try and
heatmap something, my graphics window
Peter Scacheri a écrit :
I'm having trouble with the heatmap function in R. When I try and
heatmap something, my graphics window does not open. Does anyone
know if this is a glitch in the version of R that I'm using? I've
listed my version of R below, as well as a simple heatmap
Hmmm...Seems to work OK now. Thanks for your help.
Peter
At 11:30 AM -0400 9/12/05, [EMAIL PROTECTED] wrote:
Peter Scacheri a écrit :
I'm having trouble with the heatmap function in R. When I try and
heatmap something, my graphics window does not open. Does anyone
know if this is a
Can anyone tell me how to do set
differences in R?
e.g., if I have a vector
a-c(1,2,3,4,5) and another vector
b-c(2,5), how can I do something like
a/b = (1,3,4)?
Thanks!
---
-
Steven Shechter
PhD Candidate in Industrial Engineering
[EMAIL PROTECTED] wrote:
Can anyone tell me how to do set
differences in R?
e.g., if I have a vector
a-c(1,2,3,4,5) and another vector
b-c(2,5), how can I do something like
a/b = (1,3,4)?
Thanks!
a[!a %in% b]
*or*
setdiff(a, b)
--sundar
Dear All,
I wonder if there is an efficient way to fit the generalized linear mixed
model for multivariate outcomes.
More specifically, Suppose that for a given subject i and at a given time j we
observe a multivariate outcome Yij = (Y_ij1, Y_ij2, ..., Y_ijK).
where Y_ijk is a
Somebody already did the job for you. Try fitdistr{MASS} i.e.
x=scan(clipboard)#Read your data from clipboard
sh=(mean(x))^2/var(x)
sc=var(x)/mean(x)
fitdistr(x,gamma, list(shape=sh, scale=sc))
Now you probably know that you have to be carfeul when estimating
distribution parameters from such
Andres,
thanks for detailed explanation. Things make sense now.
Regards, Gregor
__
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
I have been trying to open data that I have saved in an excel spread sheet. I
saved it as a csv. Then I tried using the read.csv command. However, everytime
I do this--
diseasedat-read.csv(M:/sloan/R/disease/disease.csv, sep=, header = TRUE,
fill= TRUE)--
I get an error message:
Error
On Mon, 12 Sep 2005, sloan jones wrote:
I have been trying to open data that I have saved in an excel spread sheet.
I saved it as a csv. Then I tried using the read.csv command. However,
everytime I do this--
diseasedat-read.csv(M:/sloan/R/disease/disease.csv, sep=, header = TRUE,
sloan jones [EMAIL PROTECTED] writes:
I have been trying to open data that I have saved in an excel spread sheet.
I saved it as a csv. Then I tried using the read.csv command. However,
everytime I do this--
diseasedat-read.csv(M:/sloan/R/disease/disease.csv, sep=, header = TRUE,
Sloan,
You don't need to save xls as csv. Actually, R reads data in excel very
well. Following code is cutted from my blog and HTH.
library(RODBC);
###
# 1. READ DATA FROM EXCEL INTO R #
Greetings,
I am running a buch of wilcox tests and need to be able to rapidly
export the results into a csv file. I have attached example code as well
as my attempts to get what I need. I have tried unlist,cbind,rbind etc
but I am obvously missing something simple. FYI I am actually running
about
I'm working on a project related to document clustering. I know that R
has clustering algorithms such as clara, but only supports two distance
metrics: euclidian and manhattan, which are not very useful for
clustering documents. I was wondering how easy it would be to extend the
clustering
Mike Bock [EMAIL PROTECTED] writes:
Greetings,
I am running a buch of wilcox tests and need to be able to rapidly
export the results into a csv file. I have attached example code as well
as my attempts to get what I need. I have tried unlist,cbind,rbind etc
but I am obvously missing
I'm looking for the binary of the Hmisc package (required for the Design librar)
for OS-X (R 2.1)
I think it is not available for download because it didn't pass all the checks.
I know, it should be easy to compile from the source, but I have no access to a
Mac which has installed the X-tools.
Chris Buddenhagen, Botany Department, Charles Darwin Research Station, Santa
Cruz,Galapagos. Mail: Charles Darwin Foundation, Casilla 17-01-3891 Avenida
6 de Diciembre N36-109 y Pasaje California Quito, ECUADOR
Dear R experts
Is there a simple means of doing this multiple comparison test in R?
On Mon, 12 Sep 2005, Chris Buddenhagen wrote:
Is there a simple means of doing this multiple comparison test in R?
p.adjust()
-thomas
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Does anyone have a valid email address for Frank Harrell of Hmisc fame? I've
tried getting in touch with him at both [EMAIL PROTECTED] and
[EMAIL PROTECTED], but messages to either of those addresses get
bounced. Frank, if you're reading this, please email me from an account that
will accept a
I am trying to use R (windows version 2.0.1) to manage runs of a program
that is run from a DOS command prompt. Is R able to call a DOS prompt? I
am hoping that there is something analogous to the spawn command in IDL,
but I can't see to find any help in the R archives...
Thanks very much,
Dear all
I have an experiment where plots either have or have not regrown (in 40
plots) after receiving 12 different herbicide treatments and a control (no
treatment). The data are significant with a Chi2, but to later distinguish
if the differences are significant between each of the 12
Hi Jan-Paul,
You definitely want to be careful with na.omit in randomForest -- that
wipes out any row with even one NA. If NAs are sprawled throughout your
dataset, na.omit might end up killing a lot of rows. Here's my usual MO
for missing values:
1) impute in Hmisc fills in gaps with the mean,
Rogers, James A [PGRD Groton] wrote:
Jose -
Before implementing SNK and Duncan's, you may want to be aware of some
criticisms of these methods:
From Hsu (1996),
Newman-Keuls multiple range test is not a confident inequalities method and
cannot be recommended.
Duncan's multiple
Sloane,
try,
diseasedat-read.csv(M:\\sloan\\R\\disease\\disease.csv)
and read http://cran.r-project.org/doc/manuals/R-data.html
JC
On Mon, 2005-09-12 at 19:58 +0100, sloan jones wrote:
I have been trying to open data that I have saved in an excel spread sheet.
I saved it as a csv.
Alternatively, you can set the working directory to your folder:
File Change dir...
Select your directory, and then:
diseasedat - read.csv(disease.csv)
Murray
-Original Message-
From: John Charles Considine [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 13 September 2005 9:29 AM
To:
Dear useRs and developeRs,
the next issue of `R news' is scheduled for the beginning of November
and we are now accepting submissions for this last issue in 2005.
For more information see
http://cran.r-project.org/doc/Rnews/
If you are the author of a package on CRAN and you would like
I searched the help for cosine distance and this was the first hit
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/3946.html
Tom
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Raymond K Pon
Sent: Tuesday, 13 September 2005 3:48 AM
To:
Timothy,
I believe you are mistaken. Fisher's exact test give the correct answer
even in the face of small expected values for the cell counts. Pearson's
Chi-square approximates Fisher's exact test and can give the wrong
answer when expected cell counts are low. Chi-square was developed
because it
John Sorkin wrote:
Timothy,
I believe you are mistaken. Fisher's exact test give the correct answer
even in the face of small expected values for the cell counts. Pearson's
Chi-square approximates Fisher's exact test and can give the wrong
answer when expected cell counts are low. Chi-square
For the record, it turns out that EXPNO ran from 1 to 20, i.e., it
identified
subject.
Thus EXPNO/COND parsed into the two error terms (additional to residual)
EXPNO and EXPNO:COND. This second error term accounts for all
variation between levels of COND; so there is no COND sum of squares.
I would appreciate help translating the following lme model to an lmer
function.
lme(lognrms ~ Group*Rotation*muscle*side*support*arms,
random=~1|Subject/Stratum2/rep, data=Data)
Many thanks
Ross Darnell
[EMAIL PROTECTED]
__
Only the random portion will differ as in:
lmer(lognrms ~ Group*Rotation*muscle*side*support*arms + (1|Subject) +
(1|Stratum) + (1|rep), Data)
-Original Message-
From: [EMAIL PROTECTED] on behalf of Ross Darnell
Sent: Mon 9/12/2005 9:28 PM
To: r-help@stat.math.ethz.ch
Cc:
There is a slight caveat in that lmer does not respect implicit nesting, so
you need to make sure your nested groups have unique levels:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/47413.html
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/47423.html
Simon.
At 11:42 AM 13/09/2005, Doran,
It sounds to me like you're looking for the function predict.rpart().
Hope this helps,
Stephen
On Sep 9, 2005, at 8:45 AM, João Mendes Moreira wrote:
Dear mailinglist members,
I have the following problem: I run a decision tree using the rpart
function and, afterwords, I try to find to
Background:
OS: Linux Mandrake 10.1
release: R 2.1.1
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
Colleagues
Since I upgraded to R 2.1.1, I am getting a an error message from R CMD
INSTALL packagename that says
R_HOME ('/usr/local/lib/R') not found.
That's not too surprising, since R is now
61 matches
Mail list logo