Dominik Maiori
2016-Apr-16 09:39 UTC
[R] Problem: No p-value for a point-baserial correlation with R
Dear community I'm pretty new to R and I'm trying to do a Point-baserial correlation for a nominal dichotomous variable with a interval scaled variable. It works fine, but the output just shows me the correlation and nothing else (p-Value would be important). I tried it with the following codes: - biseral.cor() - cor.biseral() - I also tried a polyserial() I've found on this question page: http://stackoverflow.com/questions/35880910/point-biserial-and-p-value Problem: It's not working (telling me y has fewer than 2 levels) and it would also be for a ordinal dichotomous variable, but I only have a nominal dichotomous variable. In the forum if found following Syntax that I've tried out: https://stat.ethz.ch/pipermail/r-help/2003-April/031852.html It seams to work because I don't get any error messages but I'm not getting an output either. I'm really thankful for every help I could get on this topic or tips where I can find out and learn how to find a correlation with a p-value in R for a nominal dichotomous and an interval scaled variable. Thanks in advance and have a nice weekend! [[alternative HTML version deleted]]
Fox, John
2016-Apr-16 12:41 UTC
[R] Problem: No p-value for a point-baserial correlation with R
Dear Dominik,
There's not enough information here to answer your question: You don't
show the commands you used, nor the output that was produced, and you don't
share your data. A good guess, however, is that there is only one level of the
factor, perhaps after missing data are removed, and so it's not possible to
compute a biserial correlation.
By the way, if the dichotomous factor is really nominal, then it doesn't
make sense to compute a biserial correlation, which assumes that there's a
latent continuous and normally distributed variable that has been dichotomized
at an unknown threshold.
Best,
John
-----------------------------
John Fox, Professor
McMaster University
Hamilton, Ontario
Canada L8S 4M4
web: socserv.mcmaster.ca/jfox
________________________________________
From: R-help [r-help-bounces at r-project.org] on behalf of Dominik Maiori
[d.maiori at windowslive.com]
Sent: April 16, 2016 5:39 AM
To: r-help at r-project.org
Subject: [R] Problem: No p-value for a point-baserial correlation with R
Dear community
I'm pretty new to R and I'm trying to do a Point-baserial correlation
for a nominal dichotomous variable with a interval scaled variable. It works
fine, but the output just shows me the correlation and nothing else (p-Value
would be important).
I tried it with the following codes:
- biseral.cor()
- cor.biseral()
- I also tried a polyserial() I've found on this question page:
http://stackoverflow.com/questions/35880910/point-biserial-and-p-value
Problem: It's not working (telling me y has fewer than 2 levels) and it
would also be for a ordinal dichotomous variable, but I only have a nominal
dichotomous variable.
In the forum if found following Syntax that I've tried out:
https://stat.ethz.ch/pipermail/r-help/2003-April/031852.html
It seams to work because I don't get any error messages but I'm not
getting an output either.
I'm really thankful for every help I could get on this topic or tips where I
can find out and learn how to find a correlation with a p-value in R for a
nominal dichotomous and an interval scaled variable.
Thanks in advance and have a nice weekend!
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
John Kane
2016-Apr-16 13:54 UTC
[R] Problem: No p-value for a point-baserial correlation with R
Hi Dominik Welcome to R-help Please have a look at http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and/or http://adv-r.had.co.nz/Reproducibility.html for some suggestions on how to ask questions here. In particular we probably need to know what packages have the biseral.cor() & cor.biseral() functions and some sample data. Read the part about dput() carefully. This is the best way to provide sample data to R-help. BTW try a str(mydata) and check to see that you have the factor levels you think you do. John Kane Kingston ON Canada> -----Original Message----- > From: d.maiori at windowslive.com > Sent: Sat, 16 Apr 2016 11:39:47 +0200 > To: r-help at r-project.org > Subject: [R] Problem: No p-value for a point-baserial correlation with R > > Dear community > > I'm pretty new to R and I'm trying to do a Point-baserial correlation for > a nominal dichotomous variable with a interval scaled variable. It works > fine, but the output just shows me the correlation and nothing else > (p-Value would be important). > > I tried it with the following codes: > > - biseral.cor() > - cor.biseral() > - I also tried a polyserial() I've found on this question page: > http://stackoverflow.com/questions/35880910/point-biserial-and-p-value > Problem: It's not working (telling me y has fewer than 2 levels) and it > would also be for a ordinal dichotomous variable, but I only have a > nominal dichotomous variable. > > In the forum if found following Syntax that I've tried out: > https://stat.ethz.ch/pipermail/r-help/2003-April/031852.html > It seams to work because I don't get any error messages but I'm not > getting an output either. > > I'm really thankful for every help I could get on this topic or tips > where I can find out and learn how to find a correlation with a p-value > in R for a nominal dichotomous and an interval scaled variable. > Thanks in advance and have a nice weekend! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!