Re: [R] dependent p.values in R

2016-07-16 Thread Fernando Marmolejo Ramos
dear michael

thanks for your input

i do agree in visual tests (indeed a recent paper in 
TAS=http://amstat.tandfonline.com/doi/abs/10.1080/00031305.2015.1077728 )

as a matter of fact, the test i'm after is simply for comparative purposes with 
some visualisation techniques

best

f


Fernando Marmolejo-Ramos
Postdoctoral Fellow
Gösta Ekman Laboratory
Department of Psychology
Stockholm University
Frescati Hagväg 9A, Stockholm 114 19
Sweden

ph = +46 08-16 46 07
website = http://sites.google.com/site/fernandomarmolejoramos/




From: Michael Friendly <frien...@yorku.ca>
Sent: Sunday, 10 July 2016 7:51 PM
To: Fernando Marmolejo Ramos; Marc Girondot; r-help@r-project.org
Subject: Re: dependent p.values in R

Hello Fernando

First, ask yourself what Gosta Ekman would have said if you asked him
this question.  He would have asked "does it make any difference to
your conclusion?"  He might also have asked you "Did you do a visual
test?"  Plot your data as a QQ plot or density plot?

If the test doesn't make a difference in conclusions, it is a waste of
your time (and ours) to worry about how to cite a
'combined p.value' (if such an animal exists), presumably to
more decimal places than is worth worrying about.

If the test *does* make a difference about normality, then ask yourself
does the degree of non-normality impede my substantive conclusions.

HTH,
-ichael

On 7/10/16 3:39 AM, Fernando Marmolejo Ramos wrote:
> hi marc
>
> say i have a vector with some x number of observations
>
> x = c(23, 56, 123, . )
>
> and i want to know how normal it is
>
> as there are many normality tests, i want to combine their p.values
>
> so, suppose i use shapiro.wilk, anderson darling and jarque bera and each 
> will give a pvalue
>
> i could simply average those p,values but to my knowledge that approach is 
> biased
>
> so i thought, in the same way there is a method to combine independent 
> pvalues (e.g. stouffer method); is there a way to combine dependent pvalues?
>
> best
>
> f
>
> 
> Fernando Marmolejo-Ramos
> Postdoctoral Fellow
> Gösta Ekman Laboratory
> Department of Psychology
> Stockholm University
> Frescati Hagväg 9A, Stockholm 114 19
> Sweden
>
> ph = +46 08-16 46 07
> website = http://sites.google.com/site/fernandomarmolejoramos/
>
> 
>
> ________
> From: Marc Girondot <marc.giron...@u-psud.fr>
> Sent: Sunday, 10 July 2016 8:25 AM
> To: r-help@r-project.org; Fernando Marmolejo Ramos
> Subject: Re: [R] dependent p.values
>
> Le 09/07/2016 à 17:17, Fernando Marmolejo Ramos a écrit :
>> hi all
>>
>>
>> does any one know a method to combine dependent p.values?
>>
>>
> First, it is a stats question and not a R question. So you could have
> better chance to ask this in stackexchange forum.
> Second, your question is difficult to answer without context: why
> p.values are dependent ? Do they come from the same dataset ? Or are
> they linked by an external source ? For both these situations, combining
> dependent p.values seems strange for me.
> When you will ask question in stackexchange, be more precise.
> Sincerely,
> Marc Girondot
>
> --
> __
> Marc Girondot, Pr
>
> Laboratoire Ecologie, Systématique et Evolution
> Equipe de Conservation des Populations et des Communautés
> CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079
> Bâtiment 362
> 91405 Orsay Cedex, France
>
> Tel:  33 1 (0)1.69.15.72.30   Fax: 33 1 (0)1.69.15.73.53
> e-mail: marc.giron...@u-psud.fr
> Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html
> Skype: girondot
>
>


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] dependent p.values in R

2016-07-10 Thread Fernando Marmolejo Ramos
hi marc

say i have a vector with some x number of observations

x = c(23, 56, 123, . )

and i want to know how normal it is

as there are many normality tests, i want to combine their p.values

so, suppose i use shapiro.wilk, anderson darling and jarque bera and each will 
give a pvalue

i could simply average those p,values but to my knowledge that approach is 
biased

so i thought, in the same way there is a method to combine independent pvalues 
(e.g. stouffer method); is there a way to combine dependent pvalues?

best

f


Fernando Marmolejo-Ramos
Postdoctoral Fellow
Gösta Ekman Laboratory
Department of Psychology
Stockholm University
Frescati Hagväg 9A, Stockholm 114 19
Sweden

ph = +46 08-16 46 07
website = http://sites.google.com/site/fernandomarmolejoramos/




From: Marc Girondot <marc.giron...@u-psud.fr>
Sent: Sunday, 10 July 2016 8:25 AM
To: r-help@r-project.org; Fernando Marmolejo Ramos
Subject: Re: [R] dependent p.values

Le 09/07/2016 à 17:17, Fernando Marmolejo Ramos a écrit :
> hi all
>
>
> does any one know a method to combine dependent p.values?
>
>
First, it is a stats question and not a R question. So you could have
better chance to ask this in stackexchange forum.
Second, your question is difficult to answer without context: why
p.values are dependent ? Do they come from the same dataset ? Or are
they linked by an external source ? For both these situations, combining
dependent p.values seems strange for me.
When you will ask question in stackexchange, be more precise.
Sincerely,
Marc Girondot

--
__
Marc Girondot, Pr

Laboratoire Ecologie, Systématique et Evolution
Equipe de Conservation des Populations et des Communautés
CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079
Bâtiment 362
91405 Orsay Cedex, France

Tel:  33 1 (0)1.69.15.72.30   Fax: 33 1 (0)1.69.15.73.53
e-mail: marc.giron...@u-psud.fr
Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html
Skype: girondot


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] dependent p.values

2016-07-09 Thread Fernando Marmolejo Ramos
hi all


does any one know a method to combine dependent p.values?


best



Fernando Marmolejo-Ramos
Postdoctoral Fellow
G�sta Ekman Laboratory
Department of Psychology
Stockholm University
Frescati Hagv�g 9A, Stockholm 114 19
Sweden

ph = +46 08-16 46 07
website = http://sites.google.com/site/fernandomarmolejoramos/



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] g2 test...

2013-07-04 Thread Fernando Marmolejo Ramos
dear R users

is it appropriate to use a Log likelihood ratio (G-test) test of independence 
when dealing with repeated categorical responses (e.g. 2 by 2 table) instead of 
the McNemar test?

thanks

fer

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] calculating the mode in R...

2011-03-29 Thread Fernando Marmolejo Ramos
Dear R users

I’m aware that the package “modest” is useful to find the mode in an array.

However, I’d like to know if someone has translated the “mode” function built-in
in MATLAB into R language. This function finds the most frequent value in an
array (http://www.mathworks.com/help/techdoc/ref/mode.html).

Best

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] confidence intervals around p-values

2010-09-09 Thread Fernando Marmolejo Ramos
Dear all

I wonder if anyone has heard of confidence intervals around p-values...

Any pointer would be highly appreciated.

Best

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R-help Digest, Vol 91, Issue 9

2010-09-09 Thread Fernando Marmolejo Ramos
dear all

I wonder if anyone has heard of confidence intervals around p-values...

Any pointer would be highly appreciated.

Best

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] simulating Likert-type data

2009-06-15 Thread Fernando Marmolejo Ramos
Dear R members

Could someone indicate me how to simulate Likert-type data using the GAMLSS
library and how to fit that data?

Let’s say, 50 random numbers in a variable that goes from -4 to +4 in steps of
1 (i.e., -4, -3, -2, -1, 0, 1, 2, 3, 4) with a mean of 2 and SD of 0.15 and
belonging to a normal distribution?

Cheers

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] transformation and outliers

2009-05-21 Thread Fernando Marmolejo Ramos
Dear R people

I ask again…

1.  Is there a published reference presenting the normal score
transformation? Is there a published paper (in any field) using that
transformation in the analysis of data?

And this is a new question…

2.  The “outliers” library has a function called “rm.outlier”. It offers
the option of either removing one outlier (the largest or the smallest) or
replacing the identified outlier by the mean or median of the data. Does anyone
know of a published paper introducing that particular approach (replacing the
outlier by the group’s mean/median)?

Cheers

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] normal score transformation...

2009-05-18 Thread Fernando Marmolejo Ramos
Dear R members

I’m interested in reviewing some data transformations. I’ve found literature
regarding Box-Cox, logarithmic and square-root transformations.

I know there is a library called “coin” which contains a transformation called
normal score transformation (see “normal_trafo” function). However, I’ve not
been able to find literature on that regard.

Does anyone know about bibliography reporting the use of the normal score
transformation? And published papers in any field implementing such
transformation?

Cheers

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-10-28 Thread Fernando Marmolejo Ramos
Dear Barja

Have you looked at gamlss y gamlss.dist libaries?

There some functions called WEI, WEI2, and WEI3

Cheers,

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] multiple visualisation of a bootstrap

2008-10-24 Thread Fernando Marmolejo Ramos
Dear R team

Jim Lemon recently said regarding new improvements in PrettyR and plotrix:
“Remember, it is your whingeing and moaning that have helped to make these
packages what they are today.”

So, this is my whinge: out there is a freeware called Vista, which runs, among
other things, bootstrap analyses. Most of the numerical reports given by Vista
can be done using packages such as “boot”, “bootstrap”, and “simpleboot”. I’ve
not explored all the functions in these packages thoroughly (very casually), but
the first thing I noticed is that the graphical output is majorly histograms.
Vista offers a so-called Multiple Visualisation (MV) of the output of a
bootstrap (it shows on the same window scatter plots for a particular variable
showing the bootstrapped CI, a scatter plot of the evolution of the bootstrapped
mean over many sample sizes, a box plot, a QQ plot, and a histogram).

I wonder if there is any manner in which this sort of MV could me mimicked by R
in the case of bootstrap. My best guess is that I’d have to create a 3 by 2
frame an insert each graph separately or maybe resort to Trellis graphics… am I
right? Does anyone have a more sophisticated solution?

Cheers,

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Interpretation of t.test results

2008-10-23 Thread Fernando Marmolejo Ramos
Dear Omar

Your t.test is telling that the 2 groups are not different. Now it is not clear
if you want to compute the CI for the difference or for each group. If the
former, then the outputs provides you with that information.

It’d be clearer if you provide the full syntax of your t.test. For example,
let’s suppose I have 2 groups as vectors “a” and “b”, they are independent, they
have similar homogeneity, I want to use a two-tailed test, and I want a 95%CI
for the difference, so I type…

t.test(a, b, alternative = c(two.sided), paired = FALSE, var.equal = TRUE,
conf.level = 0.95)

Cheers,

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] A line for SD, colouring simplevioplots, limiting Y axis in barplots, axis in vioplot

2008-10-23 Thread Fernando Marmolejo Ramos
Dear R people

I have 4 questions about graphics.

 QUESTION 1  2 ---

I have the following data, which is also set as a dataframe. Then I plot it
using a violin plot…
1. How can a draw a line representing 2 SD for each group?
2. How can I colour the simple violin plots in different colours (e.g., Group A
white, Group B grey)?

set.seed(1)

a = rnorm(25, 100, 50)
b = rnorm(25, 300, 50)

# --- dataframing the vectors...
adf - data.frame(Group =  Group A , Measure = a)
bdf - data.frame(Group =  Group B , Measure = b)

## Combine into a dataframe using rbind
abtruncdata - rbind(adf, bdf)
attach(abtruncdata)

require(UsingR)
with(abtruncdata, simple.violinplot(Measure~Group))

with(abtruncdata, plotmeans(Measure ~ Group, pch=16, mean.labels=TRUE, col=
c(blue, red), digits=2, add=T, p=0.95, barcol=c(blue, red), use.t=T,
n.label=F, connect=F, ci.label=F))

 QUESTION 3 ---

I have the following bar plot for the same data
3. how can I set the “ylim”, lets say from 50 to 350 in steps of 25?

tmp = split(Measure, Group)

means = sapply(tmp, mean)

stdev = sapply(tmp, sd)

require(gplots)
plotCI(barcol=blue, pch=16, col=blue, barplot(means, col=c(white,
gray90),
   ylim=c(0,max(means + stdev)), xlab = Error bars: ±1SD, ylab=Measure),
 means, stdev, add=TRUE)

 QUESTION 4 ---

The same data frame now as violin plot
4. How can I keep a violinplot frame a la simple.violinplot?

## set up frame, without axes

plot(1,1,xlim=c(0.5,2.5),ylim=range(c(a,b)),type=n,
 xlab=  ,ylab=Median measure,axes=FALSE)

## bottom axis, with user-specified labels
axis(side=1,at=1:2,labels=c(Group A,Group B))
axis(side=2)

# but as soon as I call the first violinplot, the upper and right axes appear
again!

In advance, thank you for your answers!

Cheers,

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] about granova library

2008-10-16 Thread Fernando Marmolejo Ramos
Dear all

Recently the granova package was launched. I installed but after when I
invoked it in R it requested for other libraries. They were downloaded and
install automatically.

I tried to run the example syntax of “granova.1w” and “granova.2w” but two
things happened: i) either a file called “granova.rdb” wasn’t existent or ii)
the GUI clashed and R shut down.

Has anyone else experience this? Do the developers have an answer for this
troubleshot?

I’m using a Windows Vista system and I have the R version 2.7.2.

Cheers,

Fer

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] dixon test

2008-08-12 Thread Fernando Marmolejo-Ramos

hi giov

about the dixon test... i just run a simple test with a sample of 40 and I
got:

Error in dixon.test(x) : Sample size must be in range 3-30

So it seems that most of the test in the outliers package are designed for
small samples. See also the Rnews article published in May 2006 (vol 6/2)
called processing data for outliers by Lukasz Komsta (the developer of the
package).

However there is in that package a function called scores which works for
big samples. You can also see the p-values and z scores for the observations
you have and determine which values are considered outliers.

Try this simple syntax:

library(outliers)
library(gamlss.dist)

# this produces a exponential+Gaussian distribution (which usually has heaps
of outliers!)
x - rexGAUS(100,2000,3000,5000)

# this confirms that Dixon works for samples between 3 and 30!!!
dixon.test(x)

# just to see what the data set looks like and visually confirm the outliers
boxplot(x, notch=T)

# sort the scores in ascending order
sort(x)

# returns probability of each score (using z scores) to be an outlier in
order
sort(scores(x, type=z, prob=1))

# determines which scores are considered outliers with a 95% confidence
sort(scores(x, prob=0.95))

The author points regarding the prob part...

prob  If set, the corresponding p-values instead of scores are given. If
value is set to 1, p-value are returned. Otherwise, a logical vector is
formed, indicating which values are exceeding specified probability. In z
and mad types, there is also possibility to set this value to zero, and
then scores are confirmed to (n-1)/sqrt(n) value, according to Shiffler
(1998). The iqr type does not support probabilities, but lim value can
be specified. 

The reference of Shiffler is not as the one that appears in the help. It is
this one:

Schiffler, R.E (1988). Maximum Z scores and outliers. Am. Stat. 42, 1,
79-80. 

I hope this helps,

Fernando

-- 
View this message in context: 
http://www.nabble.com/dixon-test-tp18940260p18953571.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] about the 95%CI around the median...

2008-08-04 Thread Fernando Marmolejo Ramos
Dear people

I've learnt that by using the boxplot.stats command in the grDevices library
I can get the 5-number summaries of a boxplot, plus other important information,
like the confidence interval around the median.

I'm interested in knowing the actual formula to used in that package to
calculate that confidence interval.

Can someone help me with this?

Cheers,

Fernando

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] adding the mean and standard deviation to boxplots

2008-07-23 Thread Fernando Marmolejo-Ramos

Dear users

This is a message I was directing to Harold Baize but because I pressed the
wrong button the message got lost g!!!

So I’m doing it all over again:

Lets suppose I have three batches of data:

a - rnorm(50,2500,300) 
b - rnorm(50,3500,250)
c - rnorm(50,4000,200)

# Now I want to plot them as boxplots and violin plots
require(vioplot)
vioplot (a,b,c, horizontal=T, col=“white”)
boxplot (a,b,c, horizontal=T, col=“white”)

As we know boxplot show the least-greates values, lower-upper quartiles, the
mean, and outliers (when present).

However, for some data is not important the MEDIAN but the MEAN. Also, it is
more relevant to show ERROR BARS instead of quartiles. 

So, how could I see (for the batches of data I introduced above)…

1.  a boxplot showing the MEAN and the SD instead of the lower/upper
quartile?
2.  a boxplot showing the MEAN and the STANDARD ERROR OF THE MEAN instead of
the lower/upper quartile?
3.  a boxplot showing the MEAN and the 95% CI instead of the lower/upper
quartile?

(I think in all these cases is preferable to have visual access, or to have
the line that shows, the LEAST and the GREATEST VALUES.)

In other words, that the ERROR BARS (95% CI, SD, SE) proposed here take the
place of the boxes usually used to represent the lower/upper quartile.

Now, the big question, is all this jazz possible to be implemented in violin
plots as well?

How could that be done?

Cheers,

Fernando
-- 
View this message in context: 
http://www.nabble.com/adding-the-mean-and-standard-deviation-to-boxplots-tp15271398p18604571.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.