pheno.flm.fit {pheno}R Documentation

Fits a two-way linear fixed model

Description

Fits a two-way linear fixed model. The model assumes the first factor f1 the second factor f2 to be fixed. Errors are assumed to be i.i.d. No general mean and sum of f2 is constrained to be zero.

Usage

pheno.flm.fit(D,limit=1000)

Arguments

D

Data frame with three columns (x, f1, f2) or a matrix where rows are ranks of factor f1 levels and columns are ranks of factor f2 levels and missing values are assumed to be NA or 0.

limit

Integer that determines which algorithm to use (see Details).

Details

This function is basically a wrapper for the slm.fit() function form the SparseM package, adapted for the estimation of combined phenological time series. In phenological application, x should be the julian day of observation of a certain phase, factor f1 should be the observation year and factor f2 should be a station-id. For large problems length(x)>limit, the linear model is calculated for treatment contrasts for efficiency reasons, and the constraint that the sum of f2 is zero, is adjusted afterwards. This results in a slight over-estimation of standard errors. Note that the input data is sorted before fitting, such that subsequent analyses using the input data should be done using the sorted output data frame.

Value

f1

Estimated fixed effects f1, in phenology this is precisely the combined time series.

f1.se

f1 estimated standard error.

f1.lev

Levels of f1. Should be the same order as f1.

f2

Estimated fixed effects f2, in phenology these are the station effects.

f2.se

f2 estimated standard error.

f2.lev

Levels of f2. Should be the same order as f2.

resid

Residuals

lclf1

Lower 95 percent confidence limit of factor f1.

uclf1

Upper 95 percent confidence limit of factor f1.

lclf2

Lower 95 percent confidence limit of factor f2.

uclf2

Upper 95 percent confidence limit of factor f2.

D

The input as ordered data frame, ordered first by f2 then by f1

fit

The fitted lm model object.

Author(s)

Joerg Schaber

References

Searle (1997) 'Linear Models'. Wiley. Schaber J, Badeck F-W (2002) 'Evaluation of methods for the combination of phenological time series and outlier detection'. Tree Physiology 22:973-982

See Also

lm

Examples

	data(DWD)
	R <- pheno.flm.fit(DWD)					# parameter estimation

[Package pheno version 1.7-0 Index]