% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estpw_s1_parse_design.R
\name{parse_ipwm_data}
\alias{parse_ipwm_data}
\title{Parse the data list passed to est_pw}
\usage{
parse_ipwm_data(data)
}
\arguments{
\item{data}{A named or unnamed list. The first element is the
nonprobability sample as a data frame. Every remaining element is a
survey design object (`survey.design2`, `survey.design`, or
`svyrep.design`).}
}
\value{
A list with four elements:

- `sc`: the nonprobability sample (first element of `data`).
- `sp_des`: named list of the survey design objects.
- `sp_vars`: named list of plain data frames, one per reference survey,
  with design variables removed and a `sp_wts` column added.
- `n_ref`: integer giving the number of reference surveys.
}
\description{
Splits the input list into its two parts: the nonprobability sample
(`sc`) and one or more reference survey designs (`sp_des`).
For each design it calls `extract_analysis_data()` to remove design
variables and attach a `sp_wts` column, giving back a plain data
frame ready for modeling. If the list elements have no names, or if
any element name is an empty string (partially named list), default
names `"sp[[1]]"`, `"sp[[2]]"`, ... are assigned to all elements.
}
\keyword{internal}
