Stats-in-R | Introduction to Basic Statistics with R | Analytics library
kandi X-RAY | Stats-in-R Summary
kandi X-RAY | Stats-in-R Summary
Introduction to Basic Statistics with R
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Stats-in-R
Stats-in-R Key Features
Stats-in-R Examples and Code Snippets
Community Discussions
Trending Discussions on Stats-in-R
QUESTION
As I found later somewhere else, the Chi² test is probably not appropriate for my data here or rather does not test what I want to find out. Therefore, I conducted a generalised linear model (glm) with a Poisson distribution on my data which worked out quite nicely. So bear this in mind...
.
After consulting various websites on this problem (like this, this or this) and of course the official documentation of the chisq.test
function, I still cannot figure out a solution to my problem.
I want to conduct a Chi² Test of Independence on my data via the chisq.test
function in R
. My data is composed of 4 epiphyte species found on 4 host tree species (that means: plants of 4 species growing ON these 4 tree species). Now, I want to find out if the epiphytes are equally distributed among those trees or if maybe one tree species tends to host more epiphyte individuals as the others. The standard Chi² test I can conduct quite easily (see below). But this would then as well test if epiphyte species were equally distributed, which I don't want to be tested. So, how can I submit different probabilities for my contingency table in the cisq.test
function? Namely, I want the expected matrix to be according to the number of epiphyte individuals per species while expecting them to be equally distributed among the tree species. This sounds complicated, so just have a look at my example data:
(I edited the data format as suggested by @paoloeusebi)
Observed data: ...ANSWER
Answered 2018-Dec-05 at 11:06It is better to input data as matrix instead as data frame.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Stats-in-R
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page