0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_orderpack::ctrper Interface Reference

Random permutation ranking. More...

Public Member Functions

subroutine d_ctrper (xdont, pcls)
 
subroutine r_ctrper (xdont, pcls)
 
subroutine i_ctrper (xdont, pcls)
 

Detailed Description

Random permutation ranking.

Permute array XVALT randomly, but leaving elements close to their initial locations The routine takes the 1...size(XVALT) index array as real values, takes a combination of these values and of random values as a perturbation of the index array, and sorts the initial set according to the ranks of these perturbated indices. The relative proportion of initial order and random order is 1-PCLS / PCLS, thus when PCLS = 0, there is no change in the order whereas the new order is fully random when PCLS = 1. Uses subroutine MRGRNK.

The above solution found another application when I was asked the following question: I am given two arrays, representing parents' incomes and their children's incomes, but I do not know which parents correspond to which children. I know from an independent source the value of the correlation coefficient between the incomes of the parents and of their children. I would like to pair the elements of these arrays so that the given correlation coefficient is attained, i.e. to reconstruct a realistic dataset, though very likely not to be the true one.

Parameters
[in,out]integer(i4)/real(sp,dp), dimension(:) :: XVALTArray to be randomly permuted.
[in]integer(i4)/real(sp,dp) :: PCLSNearbyness of permutation.

Definition at line 349 of file mo_orderpack.f90.

Member Function/Subroutine Documentation

◆ d_ctrper()

subroutine mo_orderpack::ctrper::d_ctrper ( real(kind = dp), dimension (:), intent(inout)  xdont,
real(kind = dp), intent(in)  pcls 
)

Definition at line 774 of file mo_orderpack.f90.

◆ i_ctrper()

subroutine mo_orderpack::ctrper::i_ctrper ( integer(kind = i4), dimension (:), intent(inout)  xdont,
real(kind = sp), intent(in)  pcls 
)

Definition at line 842 of file mo_orderpack.f90.

◆ r_ctrper()

subroutine mo_orderpack::ctrper::r_ctrper ( real(kind = sp), dimension (:), intent(inout)  xdont,
real(kind = sp), intent(in)  pcls 
)

Definition at line 808 of file mo_orderpack.f90.


The documentation for this interface was generated from the following file: