trplot: Trajectory Plot

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Generic function for a trajectory plot.

Usage

1
trplot(object, ...)

Arguments

object

An object for which a trajectory plot is meaningful.

...

Other arguments fed into the specific methods function of the model. They usually are graphical parameters, and sometimes they are fed into the methods function for Coef.

Details

Trajectory plots can be defined in different ways for different models. Many models have no such notion or definition.

For quadratic and additive ordination models they plot the fitted values of two species against each other (more than two is theoretically possible, but not implemented in this software yet).

Value

The value returned depends specifically on the methods function invoked.

Author(s)

Thomas W. Yee

References

Yee, T. W. (2020). On constrained and unconstrained quadratic ordination. Manuscript in preparation.

See Also

trplot.qrrvglm, perspqrrvglm, lvplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run:  set.seed(123)
hspider[, 1:6] <- scale(hspider[, 1:6])  # Standardized environmental vars
p1cqo <- cqo(cbind(Alopacce, Alopcune, Alopfabr, Arctlute, Arctperi,
                  Auloalbi, Pardlugu, Pardmont, Pardnigr, Pardpull,
                  Trocterr, Zoraspin) ~
            WaterCon + BareSand + FallTwig + CoveMoss + CoveHerb + ReflLux,
            poissonff, data = hspider, Crow1positive = FALSE)

nos <- ncol(depvar(p1cqo))
clr <- 1:nos  # OR (1:(nos+1))[-7]  to omit yellow

trplot(p1cqo, which.species = 1:3, log = "xy",
       col = c("blue", "orange", "green"), lwd = 2, label = TRUE) -> ii
legend(0.00005, 0.3, paste(ii$species[, 1], ii$species[, 2], sep = " and "),
       lwd = 2, lty = 1, col = c("blue", "orange", "green"))
abline(a = 0, b = 1, lty = "dashed", col = "grey") 
## End(Not run)

Example output

Loading required package: stats4
Loading required package: splines

========================= Fitting model 1 =========================

Obtaining initial values

Using initial values
         latvar
WaterCon -1.920
BareSand -0.620
FallTwig  1.810
CoveMoss -0.949
CoveHerb -0.640
ReflLux   0.518

Using BFGS algorithm
initial  value 4012.918209 
iter  10 value 1600.186736
iter  20 value 1585.228481
final  value 1585.121925 
converged

BFGS using optim(): 
Objective = 1585.122 
Parameters (= c(C)) =  
-0.1510416 0.2329134 -0.3871373 0.1333409 -0.1287636 0.2975283

Number of function evaluations = 94 


========================= Fitting model 2 =========================

Obtaining initial values

Using initial values
         latvar
WaterCon -0.310
BareSand  0.524
FallTwig -0.645
CoveMoss  0.434
CoveHerb -0.676
ReflLux   0.482

Using BFGS algorithm
initial  value 2735.465233 
iter  10 value 1585.128752
iter  10 value 1585.128752
iter  10 value 1585.128752
final  value 1585.128752 
converged

BFGS using optim(): 
Objective = 1585.129 
Parameters (= c(C)) =  
-0.1504991 0.2330136 -0.3886669 0.1331783 -0.1294179 0.2967528

Number of function evaluations = 76 


========================= Fitting model 3 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -0.2044
BareSand  0.8521
FallTwig -0.8135
CoveMoss  0.1841
CoveHerb -0.0624
ReflLux   0.3635

Using BFGS algorithm
initial  value 1924.600259 
iter  10 value 1585.505777
final  value 1585.126804 
converged

BFGS using optim(): 
Objective = 1585.127 
Parameters (= c(C)) =  
-0.1503901 0.2331198 -0.3886031 0.1332429 -0.1293851 0.296771

Number of function evaluations = 103 


========================= Fitting model 4 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -0.0415
BareSand -0.4564
FallTwig  1.0556
CoveMoss -0.3156
CoveHerb  0.3006
ReflLux  -0.6123

Using BFGS algorithm
initial  value 1747.658906 
final  value 1639.383590 
converged

BFGS using optim(): 
Objective = 1639.384 
Parameters (= c(C)) =  
-0.02527606 0.2580887 -0.49134 0.1583408 -0.1814855 0.2815691

Number of function evaluations = 60 


========================= Fitting model 5 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -0.1681
BareSand  0.8001
FallTwig -0.7836
CoveMoss -0.0834
CoveHerb -0.2582
ReflLux   0.7117

Using BFGS algorithm
initial  value 2151.399660 
iter  10 value 1585.139015
final  value 1585.128111 
converged

BFGS using optim(): 
Objective = 1585.128 
Parameters (= c(C)) =  
-0.1506031 0.2330202 -0.388598 0.1331969 -0.1293517 0.2966893

Number of function evaluations = 78 


========================= Fitting model 6 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -1.7554
BareSand -0.2666
FallTwig  1.4689
CoveMoss -0.0647
CoveHerb -0.8202
ReflLux   0.9198

Using BFGS algorithm
initial  value 2632.162536 
final  value 1750.225441 
converged

BFGS using optim(): 
Objective = 1750.225 
Parameters (= c(C)) =  
-0.02898461 -0.439939 0.3445021 -0.3543472 0.0508619 -0.1249477

Number of function evaluations = 57 


========================= Fitting model 7 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -1.3836
BareSand  0.0231
FallTwig  0.6416
CoveMoss -0.0610
CoveHerb -1.0847
ReflLux   0.6370

Using BFGS algorithm
initial  value 2579.990546 
iter  10 value 2472.126245
final  value 2472.065756 
converged

BFGS using optim(): 
Objective = 2472.066 
Parameters (= c(C)) =  
-0.8109762 0.07488711 0.4929121 0.1101043 -0.3471294 0.133196

Number of function evaluations = 49 


========================= Fitting model 8 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -1.1808
BareSand -0.0139
FallTwig  0.4164
CoveMoss  0.2191
CoveHerb -1.1275
ReflLux   0.5818

Using BFGS algorithm
initial  value 2667.102026 
iter  10 value 2472.382744
final  value 2472.067662 
converged

BFGS using optim(): 
Objective = 2472.068 
Parameters (= c(C)) =  
-0.8109079 0.07468078 0.4923414 0.109596 -0.3476266 0.1334569

Number of function evaluations = 89 


========================= Fitting model 9 =========================

Obtaining initial values

Using initial values
         latvar
WaterCon -0.199
BareSand  0.640
FallTwig -0.610
CoveMoss  0.301
CoveHerb -0.298
ReflLux   0.672

Using BFGS algorithm
initial  value 1682.075121 
iter  10 value 1585.132480
final  value 1585.125255 
converged

BFGS using optim(): 
Objective = 1585.125 
Parameters (= c(C)) =  
-0.1502456 0.2331093 -0.3887285 0.1333606 -0.129232 0.2966817

Number of function evaluations = 63 


========================= Fitting model 10 =========================

Obtaining initial values

Using initial values
          latvar
WaterCon -1.3284
BareSand  0.1682
FallTwig  0.3414
CoveMoss -0.0857
CoveHerb -1.0115
ReflLux   0.5415

Using BFGS algorithm
initial  value 2687.910553 
iter  10 value 2472.383729
final  value 2472.059103 
converged

BFGS using optim(): 
Objective = 2472.059 
Parameters (= c(C)) =  
-0.8112659 0.07464548 0.494925 0.109705 -0.3465554 0.1352938

Number of function evaluations = 89 

Warning messages:
1: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  4 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12
2: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  3 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12
3: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  3 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12
4: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  3 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12
5: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  3 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.