syn.norm: Synthesis by linear regression

View source: R/functions.syn.r

syn.normR Documentation

Synthesis by linear regression

Description

Generates univariate synthetic data using linear regression analysis.

Usage

syn.norm(y, x, xp, proper = FALSE, ...) 

Arguments

y

an original data vector of length n.

x

a matrix (n x p) of original covariates.

xp

a matrix (k x p) of synthesised covariates.

proper

a logical value specifying whether proper synthesis should be conducted. See details.

...

additional parameters.

Details

Generates synthetic values using the spread around the fitted linear regression line of y given x. For proper synthesis first the regression coefficients are drawn from normal distribution with mean and variance from the fitted model.

Value

A list with two components:

res

a vector of length k with synthetic values of y.

fit

a data frame with regression coefficients and error estimates.

See Also

syn, syn.normrank, syn.lognorm


synthpop documentation built on Aug. 31, 2022, 5:06 p.m.