## Calculate the probability contents associated with the integer score

### Description

Calculate the probability contents associated with the integer score

### Usage

```graded_prob(
x,
mean,
std,
min = NULL,
max = NULL,
truncate = 0,
method = 1,
print = 0,
plot = 0
)
```

### Arguments

 `x` The integer score vector `mean` The mena of the underlying contimuous variable `min` The minimum value of x `max` The maximum value of x `truncate` = 1 to truncate the range of X between [min,max] `method` = 1 to use pnorm(x[i+1])-pnorm(x[i]) = 0 to set the probabilities proportional to dnorm(x) `print` = 1 to print the result `plot` = 1 to plot the result

### Details

Let Y be distributed as N( mean, std ). This function evaluates the probabilities: p[1] = Pr( min < X <= x[1] ), p[2] = Pr( x[1] < X <= x[2] ), ... p[length(x)] = Pr( x[n] < X <= max )

If method = 1,
p[i] = pnorm( b[i+1], mean, std ) - pnorm( b[i], mean, std )
else
p[i] = dnorm( x[i], mean, std )

If method = 2 or method = 1 and truncate = 1,
the probabilites will be normalized so that sum(p) = 1.
When truncate = 1, if the interval (min, max) is not wide enough to cover the whole range of X, the resulting probabilities may not sum to unity.

### Value

p A vector (same size as x)

### Examples

```# The rightmost/leftmost categoris are wider than the rest.
# truncation has no effect
graded_prob( 0:4,  2, 2,  truncate=0, print=1  )
graded_prob( 0:4,  2, 2,  truncate=1, print=1  )
graded_prob( 0:4,  2, 2,  method=2, print=1  )

# The rightmost/leftmost categoris have the same length as the rest.
graded_prob( 0:4,  2, 2,  min=-0.5, max=4.5, truncate=0  )
graded_prob( 0:4,  2, 2,  min=-0.5, max=4.5, truncate=1  )

```

[Package lazy.irt version 0.1.3 Index]