Learn R Programming

SemiParSampleSel (version 1.5)

resp.check: Preliminary response diagnostics

Description

It takes takes the response vector and produces a histogram and QQ-plot. For discrete responses normalized and randomized QQ-plots are produced.

Usage

resp.check(y, margin = "N", bd = 1)

Arguments

y
reponse vector
margin
margin of interest. Is the response distributed according to the margin? The default is normal outcome.
bd
Binomial denominator - maximum value the response can take. This argument is only relevant in the case of BI, BB, ZIBI, ZABI, ZIBB and ZABB.

Examples

Run this code

library(SemiParSampleSel)

# Generating normal response with n = 2000
ys <- rnorm(2000, mean=3, sd=1)
resp.check(ys, margin = "N")

## Not run: ------------------------------------
# 
# # Generating gamma response with n = 2000
# ys <- rgamma(2000, shape=2, rate=3)
# resp.check(ys, margin = "G")
# 
# # Generating Poisson response with n = 2000
# ys <- rPO(2000, mu=3)
# resp.check(ys, margin = "P")
# 
# # Generating negative binomial response with n = 2000
# ys <- rNBI(2000, mu=3, sigma=1)
# resp.check(ys, margin = "NB")
# 
## ---------------------------------------------


Run the code above in your browser using DataLab