# Calculating ICC and finding p=0

I try to calculate intraclass correlation coefficient (ICC) between two variables in the dataset "DATASETNAME":

``````icc(DATASETNAME, model = "twoway", type = "agreement", unit = "single")
``````

I get ICC and 95% confidence interval (with real numbers), however the p-value is calculated to be 0.
Is there any way to get the exact p-value with its decimals or (number)e-(number)? Does "p=0" mean something in R (like for example when p<0.001, then R will display p=0)?

I already tried this but still got p=0:

``````icc(DATASETNAME, model = "twoway", type = "agreement", unit = "single")\$p.value
``````

what package are you using for `icc` ?

I used "irr" package to use the icc function.

I tested this function on highly similar ratings columns, and got very low p value but not exactly zero. Its not obvious to me how to abuse my data to get a p=0 to come out. Can you provide example data to demonstrate that ?

# Short Version

You can share your data in a forum friendly way by passing the data to share to the dput() function.
If your data is too large you can use standard methods to reduce it before sending to dput().
When you come to share the dput() text that represents your data, please be sure to format your post with triple backticks on the line before your code begins to format it appropriately.

`````````
( example_df <- structure(list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6,
5, 4.4, 4.9), Sepal.Width = c(3.5, 3, 3.2, 3.1, 3.6, 3.9, 3.4,
3.4, 2.9, 3.1), Petal.Length = c(1.4, 1.4, 1.3, 1.5, 1.4, 1.7,
1.4, 1.5, 1.4, 1.5), Petal.Width = c(0.2, 0.2, 0.2, 0.2, 0.2,
0.4, 0.3, 0.2, 0.2, 0.1), Species = structure(c(1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L), .Label = c("setosa", "versicolor", "virginica"
), class = "factor")), row.names = c(NA, -10L), class = c("tbl_df",
"tbl", "data.frame")))
```
``````

Out of curiosity, what results do you get if you usue the `ICC` function in the {psych} package?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.