pystatpower.correlation.ci
¶
| FUNCTION | DESCRIPTION |
|---|---|
solve_distance |
Calculate the width of correlation coefficient confidence interval or the distance from the correlation coefficient to the confidence limit. |
solve_size |
Estimate the required sample size. |
solve_distance
¶
solve_distance(
*,
correlation: float,
size: int,
conf_level: float = 0.95,
interval_type: Literal["two-sided", "lower", "upper"] = "two-sided",
bias_adj: bool = False,
) -> float
Calculate the width of correlation coefficient confidence interval or the distance from the correlation coefficient to the confidence limit.
| PARAMETER | DESCRIPTION |
|---|---|
correlation
|
Correlation coefficient.
TYPE:
|
size
|
Sample size.
TYPE:
|
conf_level
|
Confidence level.
TYPE:
|
interval_type
|
Type of the confidence interval.
TYPE:
|
bias_adj
|
Whether to adjust for the bias.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
The width of correlation coefficient confidence interval or the distance from the correlation coefficient to the confidence limit.
|
solve_size
¶
solve_size(
*,
correlation: float,
distance: float,
conf_level: float = 0.95,
interval_type: Literal["two-sided", "lower", "upper"] = "two-sided",
bias_adj: bool = False,
) -> int
Estimate the required sample size.
| PARAMETER | DESCRIPTION |
|---|---|
correlation
|
Correlation coefficient.
TYPE:
|
distance
|
The width of correlation coefficient confidence interval or the distance from the correlation coefficient to the confidence limit.
TYPE:
|
conf_level
|
Confidence level.
TYPE:
|
interval_type
|
Type of the confidence interval.
TYPE:
|
bias_adj
|
Whether to adjust for bias.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
The required sample size. |