setweights

Sets automatically the weights for the data (to be used in a regression)

Contents

Syntax

weight = setweights (data, weight)

Description

computes weights for given data and adds it to the weight structure: for the zero-variate data y the weight will be 1, for the uni-variate data y the weight will be 1/N

Inputs:

Output:

Example of use

weight = setweights(data, []) computes the data weights for all data and outputs a new structure weight with the results weight = setweights(data, weight) computes the missing data weights in structure weight and adds them to it