smn {lazy.irt} | R Documentation |
Maximum likelihood estimation of the parameters of
the parametric (normal pdf) scored multinomial distribution.
Japanese help file: (smn_JPH)
smn(
x,
f,
mu = NULL,
sigma = NULL,
estmu = 1,
estsigma = 1,
maxiter = 100,
eps = 1e-08,
print = 1,
plot = 0
)
x |
Score (numerical category label) |
f |
Frequency vector which sums to unity |
mu |
Initial value of the mean paramter to be estimated or NULL |
sigma |
Initial value of sigma the sigma parameter to be estimated or NULL |
estmu |
= 0 to skip the estimation of mu |
estsigma |
= 0 to skip the estimation of sigma |
maxiter |
max # of iterations |
eps |
eps for convergence |
print |
= 1 to print result |
plot |
= 1 to plot result |
Given data, (x,f), where x is the domain and f is the associated
frequency,
this program maximizes the following multinomial log likelihood
lnL = \sum_{i} f_i \log{p(x_i)}
where
p(x_i) = c \times dnorm( x_i, mu, sigma )
and c = 1 / \sum_{i} dnorm( x_i, mu, sigma )
with respect to mu and sigma.
A list of:
P A vector of estimated probability
x A vector of score
mu Estimated mean parameter
sigma Estimated standard deviation parameter
estmu = 1 to estimate mu
estsigma = 1 to estimate sigma
llh Maximized log likelihood
mean Sample mean
std Sample standard deviation
set.seed(1701)
n <- 1000
npoints <- 21
resg <- list(midpoints=c(-2,-1,0,1,2), freq=c(5,6,8,6,2))
res <- smn( resg$midpoints, resg$freq, print=1, plot=1, mu=0, sigma=1 )