% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pd_lm.R
\name{pd_lm.fit}
\alias{pd_lm.fit}
\title{The work horse for fitting the probabilistic dropout model}
\usage{
pd_lm.fit(
  y,
  X,
  dropout_curve_position,
  dropout_curve_scale,
  location_prior_mean = NULL,
  location_prior_scale = NULL,
  variance_prior_scale = NULL,
  variance_prior_df = NULL,
  location_prior_df = 3,
  method = c("analytic_hessian", "analytic_grad", "numeric"),
  verbose = FALSE
)
}
\value{
a list with the following entries
  \describe{
    \item{coefficients}{a named vector with the fitted values}
    \item{n_approx}{the estimated "size" of the data set (n_hat - variance_prior_df)}
    \item{df}{the estimated degrees of freedom (n_hat - p)}
    \item{s2}{the estimated unbiased variance}
    \item{n_obs}{the number of response values that were not `NA`}
  }
}
\description{
If there is no location and variance moderation and no missing values,
the model is fitted with `lm`.
}
\keyword{internal}
