Learn R Programming

fso (version 2.1-2)

step.mfso: Step-Wise Forward Variable Selection in a Multivariate Fuzzy Set Ordination

Description

A simple routine to screen variables for addition to a multivariate fuzzy set ordination (MFSO). The routine operates by adding variables one at a time to an existing MFSO (which can be NULL), and calculating the correlation coefficient between the underlying dissimilarity matrix (object of class ‘dist’) and the pair-wise distances in the MFSO ordination.

Usage

step.mfso(dis,start,add,numitr=100,scaling=1)

Value

Produces a table of the analysis but does not produce any objects

Arguments

dis

a dissimilarity of distance object from dist, dsvdis, or ‘vegdist’ or other ‘dist’ object

start

either NULL (to find the first variable to add) or a data.frame of binary or quantitative variables to use in the base model

add

a data.frame of binary or quantitative variables to screen for addition to the model

numitr

the number of random permutations of a vector to use in establishing the probability of observing as large an increase in correlation as observed

scaling

the scaling parameter to pass along to mfso

Author

David W. Roberts droberts@montana.edu

Details

‘mfso’ is intended as a tool for analysis of multiple competing hypotheses, and the analyst is expected to have a priori models to compare. Nonetheless, ‘mfso’ can be used in a hypothesis generating variable screening mode by maximizing the correlation between the underlying dissimilarity matrix and the pair-wise distances in the ‘mfso’ ordination.

The step.mfso function is an inelegant approach to step-wise forward variable selection in mfso. It considers each variable offered in turn, calculates the mfso resulting from adding that variable to the given mfso, permutes that variable ‘numitr’ times, and determines a probability of observing as large an increase in correlation as observed. After testing all variables for inclusion, it simply prints a table of the calculations, and the analyst has to rerun the routine adding the selected variable to data.frame ‘start’ and deleting it from ‘add’.

While it would be nice to automate the production of the step-wise ‘mfso’, to date I have only implemented this limited function. In addition, model parsimony is ensured by the permutation routine, rather than an AIC-based approach, and doesn't directly penalize for degrees of freedom (number of variables).

References

Roberts, D.W. 2007. Statistical analysis of multidimensional fuzzy set ordinations. Ecology in press

Examples

Run this code
	if (FALSE) require(labdsv) # make data available
        if (FALSE) data(bryceveg)  # get vegetation data
        if (FALSE) data(brycesite) # get environmental data
        if (FALSE) dis.bc <- dsvdis(bryceveg,'bray.curtis') # produce dist object
        if (FALSE) attach(brycesite)   # make variables easily available
        if (FALSE) step.mfso(dis.bc,start=NULL,add=data.frame(elev,slope,av))
        if (FALSE) step.mfso(dis.bc,start=data.frame(elev),add=data.frame(slope,av))

Run the code above in your browser using DataLab