Extract eCDF Values from ecdf() Function in R (Example) | How to Get & Print Data | Combine Values

Описание к видео Extract eCDF Values from ecdf() Function in R (Example) | How to Get & Print Data | Combine Values

How to extract the eCDF values from the ecdf() function in the R programming language. More details: https://statisticsglobe.com/extract-e...
R code of this video:

set.seed(456383) # Seed for reproducibility
x <- rnorm(100) # Normal distribution
head(x) # Print random values

plot(ecdf(x), # Create ecdf plot in R
xlim = c(- 3, 3))

fun_ecdf <- ecdf(x) # Create ecdf function

class(fun_ecdf) # Check class

my_ecdf <- fun_ecdf(x) # Apply ecdf function
head(my_ecdf) # Print output of function

data_ecdf <- data.frame(x, my_ecdf) # Combine x & eCDF values
head(data_ecdf) # Print head of data frame

plot(data_ecdf$x, # Plot eCDF values once again
data_ecdf$my_ecdf,
xlim = c(- 3, 3))

Follow me on Social Media:
Facebook – Statistics Globe Page:   / statisticsglobecom  
Facebook – R Programming Group for Discussions & Questions:   / statisticsglobe  
Facebook – Python Programming Group for Discussions & Questions:   / statisticsglobepython  
LinkedIn – Statistics Globe Page:   / statisticsglobe  
LinkedIn – R Programming Group for Discussions & Questions:   / 12555223  
LinkedIn – Python Programming Group for Discussions & Questions:   / 12673534  
Twitter:   / joachimschork  

Music by bensound.com

Комментарии

Информация по комментариям в разработке