model_analysis: Find Accepted Model From ICP Object

Description Usage Arguments Details Value See Also Examples

View source: R/ICP-variable_analysis.R

Description

The model_analysis function takes an ICP object and a significance level and outputs the accepted model at this level.

Usage

1
model_analysis(x, level = 0.05, gof = 0.01)

Arguments

x

An ICP object

level

The significance level required for a model to be considered invariant. The higher the significance level the stronger the requirements for godness of fit to attain 'invariance' status.

gof

If no set of variables (including the empty set) leads to a p-value larger than the goodness-of-fit cutoff gof, the whole model will be rejected. If the model is correct, this will happen with a probability of gof and this option protects again making statements when the model is obviously not suitable for the data.

Details

The function model_analysis takes an ICP object and a significance level and outputs the accepted model at this level:

Accepted X columns = ∩{S: H0,S accepted} S.
See ICP for more details on the hypotheses (H0,S).

The gof parameter protects against making statements when the model is obviously not suitable for the data. If no model reaches the threshold gof significance level, i.e. the p-values for (H0,S) are all smaller then gof, we report that there is no evidence for an invariant set.

This function is also used internally in the ICP function itself if ICP is called with level specified.

Value

model_analysis returns an object of class "model_analysis" containing the following components:

gof

goodness-of-fit cufoff.

level

significance level of hypothesis tests.

accepted.model

the accepted model.

empty.message

if the empty set is returned as accepted.model then empty.message will give detailes.

call

the matched call.

See Also

The model_analysis function is also used internally in the ICP function itself if ICP is called with level specified.

variable_analysis is another function for summarizing ICP objects.

Examples

1
2
3
4
5
6
7
n <- 100
E <- sample(5L, n, replace = TRUE)
X <- data.frame(X1 = rnorm(n, E, 1), X2 = rnorm(n, 3, 1))
Y <- rnorm(n, X$X1, 1)

obj <- ICP(Y, X, E, fullAnalysis = TRUE)
model_analysis(obj, level = 0.05, gof = 0.15)

Laksafoss/ICPSurv documentation built on Feb. 26, 2020, 11:32 a.m.