stepplfm {plfm}R Documentation

Probabilistic latent feature analysis of two-way two-mode frequency data

Description

The function stepplfm subsequently applies the plfm function to fit disjunctive, conjunctive or additive models with minF up to maxF latent features. The results of the different models are stored in a list.

Usage

	stepplfm(minF,maxF,data,object,attribute,
 	rating,freq1,freqtot,datatype="freq",
	maprule="disj",M=5,emcrit1=1e-2,emcrit2=1e-10,
        printrun=TRUE)

Arguments

minF

Minimum number of features to be fitted

maxF

Maximum number of features to be fitted

data

A data frame that consists of three components: the variables object, attribute and rating. Each row of the data frame describes the outcome of a binary rater judgement about the association between a certain object and a certain attribute.

object

The name of the object component in the data frame data. The values of the vector data$object should be (non-missing) numeric or character values.

attribute

The name of the attribute component in the data frame data. The values of the vector data$attribute should be (non-missing) numeric or character values.

rating

The name of the rating component in the data frame data. The elements of the vector data$rating should be the numeric values 0 (no association) or 1 (association), or should be specified as missing (NA).

freq1

J X K matrix of observed association frequencies.

freqtot

A J X K matrix with the total number of binary ratings in each cell (j,k). If the total number of ratings is the same for all cells of the matrix it is sufficient to enter a single numeric value rather than a matrix. For instance, if N raters have judged J X K associations, one may specify freqtot=N.

datatype

The type of data used as input. When datatype="freq" one should specify frequency data freq1 and freqtot, and when datatype="dataframe" one should specify the name of the data frame data, and its components, object, attribute and rating.

maprule

Fit disjunctive models (maprule="disj"), conjunctive models (maprule="conj"), or additive models (maprule="add"). Multiple mapping rules can be computed in one analysis. For instance, to compute both disjunctive and conjunctive models one my use maprule="disj/conj". Other combinations are maprule="disj/add", maprule="conj/add" and maprule="disj/conj/add".

M

The number of times a particular model is estimated using random starting points.

emcrit1

Convergence criterion which indicates when the estimation algorithm should switch from Expectation-Maximization (EM) steps to EM+Newton-Rhapson steps.

emcrit2

Convergence criterion which indicates final convergence to a local maximum.

printrun

printrun=TRUE prints the analysis type (disjunctive, conjunctive, additive), the number of features (F) and the number of the run to the output screen, whereas printrun=FALSE suppresses the printing.

Details

When only one type of mapping rule is requested (disjunctive, conjunctive, additive) (i.e., maprule="disj", maprule="conj" or maprule="add") with minF to maxF features, the results of subsequent plfm analyses are stored in a list with maxF-minF+1 components. When analyses with multiple mapping rules are requested (e.g. maprule="disj/conj"), the results for each mapping rule are stored in a list with maxF-minF+1 components (e.g., two lists named "disj" and "conj", respectively) . The final object generated by stepplfm combines the lists "disj" and "conj" in a list with two components.

Author(s)

Michel Meulders

Examples



## Not run: 
# example 1:Perceptual analysis of associations between car models and car attributes

# load car data
data(car)


# compute 5 runs of disjunctive and conjunctive models with 1 up to 4 features
car.lst<-stepplfm(minF=1,maxF=4,maprule="disj/conj",freq1=car$freq1,
                  freqtot=car$freqtot,M=5,emcrit1=1e-6)

# print output of the conjunctive model with 4 features
car.lst$conj[[4]]

# print output of the stepplfm analysis on the car data
car.lst

# summarize and print output of stepplfm analysis on car data
sumcar<-summary(car.lst)
sumcar

# visualize fit of models with different mapping rules and a different number of features
par(pty="s")
par(mfrow=c(2,2))
plot(car.lst,which="BIC")
plot(car.lst,which="AIC")
plot(car.lst,which="VAF")

## End(Not run)


## Not run: 
# example 2: analysis on determinants of anger-related behavior

# load anger data
data(anger)

# compute 1 run of disjunctive models with 1 up to 3 features
anger.lst<-stepplfm(minF=1,maxF=3,maprule="disj",freq1=anger$freq1,freqtot=anger$freqtot,M=1)

# print output of disjunctive model with 2 features

anger.lst[[2]]

# print output of stepplfm analysis on anger data
anger.lst

# summarize and print output of stepplfm analysis on anger data
sumanger<-summary(anger.lst)
sumanger

# visualize fit of models with different mapping rules and a different number of features

par(pty="s")
par(mfrow=c(2,2))
plot(anger.lst,which="BIC")
plot(anger.lst,which="AIC")
plot(anger.lst,which="VAF")

## End(Not run)

[Package plfm version 2.2.6 Index]