plot.LCplfm {plfm}R Documentation

plot parameters in LCplfm object

Description

Plot method to visualize the parameters of latent class probabilistic feature models with different numbers of features/classes.

Usage

## S3 method for class 'LCplfm'
plot(x, feature=1, class=0, element="object", cexsymb=1, cexlabel=1,
                      minpositionlabel = -1, positionlabel = -0.8, xlegend = "topright", 
                      ylegend=NULL, x.intersplegend=1, y.intersplegend=1, ...)

Arguments

x

Latent class probabilistic feature model object returned by LCplfm.

feature

Latent feature for which parameters are visualized.

class

Latent class for which parameters are visualized. When the model contains class-specific object- or attribute parameters, class=0 means that parameters of all classes are included in the plot.

element

Object parameters are plotted if element="object" and attribute parameters are plotted if element="attribute".

cexsymb

Size of symbol used for plotting points.

cexlabel

Size of object- or attribute labels in plot.

minpositionlabel

Value smaller than 0 that defines space for plotting object- or attribute labels.

positionlabel

Value between minpositionlabel and 0 to align object- or attribute labels.

xlegend, ylegend

The x and y co-ordinates to be used to position the legend. They can be specified by keyword or in any way which is accepted by xy.coords: See "Details" of legend.

x.intersplegend

Character interspacing factor for horizontal (x) spacing in legend.

y.intersplegend

Character interspacing factor for vertical (y) line distances in legend.

...

Further arguments are ignored.

Examples


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

# load anger data
data(anger)

# compute 5 runs of disjunctive latent class probabilistic feature model
# with 4 features and 2 latent classes
# assume constant situation classification per person 
# and class-specific situation parameters (i.e. model=1) 

anger.m1<-LCplfm(data=anger$data,F=4,T=2,maprule="disj",
                  M=5,emcrit1=1e-3,emcrit2=1e-8,model=1)

# visualize object and attribute parameters 
# of both classes per feature in one figure

par(mfrow=c(2,2),pty="s")
plot(anger.m1,element="attribute",feature=1, main="Feature 1", 
     minpositionlabel=-2, positionlabel=-1)
plot(anger.m1,element="attribute",feature=2, main="Feature 2", 
     minpositionlabel=-2, positionlabel=-1)
plot(anger.m1,element="attribute",feature=3, main="Feature 3", 
     minpositionlabel=-2, positionlabel=-1)
plot(anger.m1,element="attribute",feature=4, main="Feature 4", 
     minpositionlabel=-2, positionlabel=-1)

par(mfrow=c(2,2),pty="s")
plot(anger.m1,element="object",feature=1,main="Feature 1", 
     minpositionlabel=-1.5, positionlabel=-1, y.intersplegend=0.7)
plot(anger.m1,element="object",feature=2,main="Feature 2", 
     minpositionlabel=-1.5, positionlabel=-1, y.intersplegend=0.7)
plot(anger.m1,element="object",feature=3,main="Feature 3", 
     minpositionlabel=-1.5, positionlabel=-1, y.intersplegend=0.7)
plot(anger.m1,element="object",feature=4,main="Feature 4", 
     minpositionlabel=-1.5, positionlabel=-1, y.intersplegend=0.7)

# compute 5 runs of disjunctive latent class probabilistic feature model
# with 2 features and 2 latent classes
# assume constant situation classification per person 
# and class-specific situation and behavior parameters (i.e. model=3) 

anger.m3<-LCplfm(data=anger$data,F=2,T=2,maprule="disj",
                  M=5,emcrit1=1e-3,emcrit2=1e-8,model=3)

# visualize object and attribute parameters of feature 1,2 
# for class 1
par(mfrow=c(2,2)) 
plot(anger.m3,element="attribute",feature=1, class=1,main="Feature 1, class 1", 
     minpositionlabel=-2, positionlabel=-1)
plot(anger.m3,element="attribute",feature=2, class=1,main="Feature 2, class 1", 
     minpositionlabel=-2, positionlabel=-1)
plot(anger.m3,element="object",feature=1, class=1,main="Feature 1, class 1", 
     minpositionlabel=-2, positionlabel=-1)
plot(anger.m3,element="object",feature=2, class=1,main="Feature 2, class 1", 
     minpositionlabel=-2, positionlabel=-1)


# visualize object and attribute parameters of feature 1,2 
# for class 2
par(mfrow=c(2,2))
plot(anger.m3,element="attribute",feature=1, class=2,main="Feature 1, class 2", 
     minpositionlabel=-1.7, positionlabel=-1, y.intersplegend=0.7)
plot(anger.m3,element="attribute",feature=2, class=2,main="Feature 2, class 2", 
     minpositionlabel=-1.7, positionlabel=-1, y.intersplegend=0.7)
plot(anger.m3,element="object",feature=1, class=2,main="Feature 1, class 2", 
     minpositionlabel=-1.7, positionlabel=-1, y.intersplegend=0.7)
plot(anger.m3,element="object",feature=2, class=2,main="Feature 2, class 2", 
     minpositionlabel=-1.7, positionlabel=-1, y.intersplegend=0.7)


## End(Not run)

[Package plfm version 2.2.6 Index]