50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

pcds (version 0.1.8)

centersMc: Parameterized centers of intervals

Description

Returns the centers of the intervals based on 1D points in Yp parameterized by c(0,1) so that 100c % of the length of interval is to the left of Mc and 100(1c) % of the length of the interval is to the right of Mc. That is, for an interval (a,b), the parameterized center is Mc=a+c(ba) Yp is a vector of 1D points, not necessarily sorted.

See also (ceyhan:metrika-2012,ceyhan:revstat-2016;textualpcds).

Usage

centersMc(Yp, c = 0.5)

Value

(parameterized) centers of the intervals based on Yp points as a vector

Arguments

Yp

A vector real numbers that constitute the end points of intervals.

c

A positive real number in (0,1) parameterizing the centers inside the intervals with the default c=.5. For the interval, int=(a,b), the parameterized center is Mc=a+c(ba).

Author

Elvan Ceyhan

References

See Also

centerMc

Examples

Run this code
# \donttest{
n<-10
c<-.4  #try also c<-runif(1)
Yp<-runif(n)
centersMc(Yp,c)

c<-.3  #try also c<-runif(1)
Yp<-runif(n,0,10)
centersMc(Yp,c)
# }

Run the code above in your browser using DataLab