Processing math: 100%
Skip to contents

The function metrics.variables used for the calculation of stand-level variables and metrics (see vignette “Stand-level”) requires arguments specifying the plot designs and sizes. If the optimal plot design and size for the calculation of stand-level variables is not known, the optimal plots design for the corresponding TLS data can be determined by two different approaches implemented in FORTLS. The approaches depend on whether field data for the sample plots is available or not.

Estimating optimal plot size without field data

If no field data is available, the function estimation.plot.size can be applied to determine the optimal plot design and size. This function uses the data frame containing the list of detected trees (introduced in tree.tls) and estimates stand-level density (N, trees/ha) and basal area (G, m2/ha) for many simulated differently-sized plots and the three plot designs (circular fixed area, k-tree and angle-count) by increasing continuously their sizes.

Thus, circular fixed area plots with increasing radius (increment of 0.1 m) to the maximum radius defined by radius.max in plot.parameters (by default set to 25, if radius is larger than furthest tree, the horizontal distance to this furthest tree is considered as maximum radius) will be simulated and for each plot, the variables (N and G) are estimated. Similarly, k-tree plots with tree numbers (k) ranging from 1 to k.max (specified in plot.parameters, default value set to 50 or total number of trees in the plot) and angle-count plots with increasing basal area factor (BAF, increments of 0.1 m2/ha) to the maximum value specified by BAF.max in plot.parameters (set to 4 by default) are simulated and the respective stand-level variables are calculated. Optionally, the minimum diameter at breast height (dbh.min, in cm) to include the trees in the estimations can be defined. By default the minimum dbh is set to 4 cm.

The function generates size-estimation charts i.e., plots showing the estimated stand-level density (N) and basal area (G) on the y axes respective to the different plot sizes (x axes). The estimations will be performed for simulated plots corresponding to all sample plots. By default the output graphs will contain one line for each sample plot. When average is set to TRUE, the average of all estimations (for all plots) as a continuous line and the standard deviation as grey shaded area will be drawn instead of multiple lines for each sample plot. One chart for each plot design is drawn by default. If all.plot.designs is set to TRUE, the line charts of all three plot design will be drawn in one graph with different colours for each plot design.

estimation.plot.size(tree.tls = tree.tls,
                     plot.parameters = data.frame(radius.max = 25, k.max = 50, BAF.max = 4),
                     dbh.min = 4,
                     average = TRUE, all.plot.designs = FALSE)

The continuous line represents the average over all sample plots (i.e. 16 plots in the example shown here) of the estimated density (N) on the left and the basal area (G) on the right. The dotted line indicates the number of sample plots. This figure helps to find suitable plot designs for the calculation of stand-level metrics and variables. The optimal plot design and size should be chosen within a range where the estimated values for N and G reach a stable level. A too small plot leads to high errors of estimation, since only few trees enter the plot and therefore the sample is too small. In the example above, the basal area estimated for fixed area plots with radius smaller than 5 m is much higher (around 40-50 m2/ha) than the true value (around 20 m2/ha). On the other hand, too large plots come along with systematic errors due to occlusion of trees. Therefore, the basal area in the same example of fixed area plots with radius bigger than 20 m is estimated lower than the true value. In order to avoid both types of errors, the figure helps to find a plot size range with stable values.

Validation with field data and optimizing plot design

When data from field measurements are available for the same sample plots, the TLS-based estimates can be validated and the optimal plot designs can be found applying functions implemented in FORTLS. In the first step of the optimization process, the function simulations simulates plots with incremental size and computes the corresponding stand-level metrics and variables (similar to the function metrics.variables, see “Stand-level” vignette). Based on the simulated data, two different processes can be performed. First, the bias between TLS data and field data for each individual estimated variable can be assessed with the function relative.bias. Second, correlations between all estimated variables and metrics based on TLS-data (output data of the simulations function) and the variables estimated from field data can be calculated with the correlations function. This function calculates both the Pearson and Spearman correlation coefficients. To visualize the correlation coefficients, heat maps can be drawn with the optimize.plot.design function.

Plot simultaion and estimation of metrics and variables

The simulations function is applied as follows:

simulations <- simulations(tree.tls = tree.tls, tree.ds = tree.ds, tree.field = tree.field,
            plot.design = c("fixed.area", "k.tree", "angle.count"),
            plot.parameters = data.frame(radius.max = 25, k.max = 50, BAF.max = 4),
            scan.approach = "single", var.metr = list(tls = NULL, field = NULL),
            dbh.min = 4, h.min = 1.3, max.dist = Inf,
            dir.data = dir.data, save.result = FALSE, dir.result = NULL)

The input data frames

Both TLS and field data from the same sample plots are required to compute the function. The TLS data introduced in tree.tls should have the same format as the data frame returned from the tree.detection.single.scan and tree.detection.multi.scan functions. Thus, each row must correspond to a detected tree and it must contain at least the following columns: id, file, tree, x, y, phi.left, phi.right, horizontal.distance, dbh, num.points, num.points.hom, num.points.est, num.points.hom.est and partial.occlusion. The data frame containing the field data must be inserted in the argument tree.field. Similar to the TLS data table, each row must correspond to a tree (specified in the columns id and tree) and the values for horizontal.distance, dbh, total.height and an integer value indicating whether the tree is dead (1) or alive (NA, specified in dead) must be included in the data frame.

When the distance sampling method for correction of occlusion effects was applied (function distance.sample, see “Stand-level” vignette), a list with the results in the output data frames from the aforesaid function can be introduced in tree.ds. The list must contain at least the data frame tree with the detection probabilities (P.hn, P.hn.cov, P.hr and P.hr.cov) for each tree. By default tree.ds is set to NULL and as a result, the calculations of the variables based on occlusion correction will not be performed.

Specifying designs of simulated plots

A vector containing the names of the plot designs can specify the plot designs ("fixed.area", "k.tree", "angle.count") that are to be considered for the simulations in plot.design. By default, this argument is set to NULL and all three plots designs will be considered.

Furthermore the argument plot.parameters allows for manually specifying the design of the simulated plots. Many differently-sized plots of the plot designs specified in plot.design are simulated. The list introduced in plot.parameters can include the following elements to customize the generated plots. The elements radius.max, k.tree.max and BAF.max define the maximum radius (in m), the maximum number of trees and the maximum BAF (in m2/ha) respectively to which the sizes of circular fixed area, k-tree and angle-count plots respectively should increase. By default the values are set to radius.max = 25, k.tree.max = 50 and BAF.max = 4. The increment by which the sizes of circular fixed area and angle-count plots sequentially increase can also be customized by specifying the elements radius.increment and BAF.increment respectively. The default settings are radius.increment = 0.1 (in m) and BAF.increment = 0.1 (in m2/ha). An additional element of the list can be num.trees defining the number of dominant trees per hectare (trees/ha). This value is needed for the calculation of dominant diamters and heights and is set to 100 trees/ha by default.

Further adjustable arguments

Similar to the other functions, the scan approach can be specified in scan.approach and is by default set to "multi". Metrics and variables of interest can be defined as a vector in var.metr. Thus, only those metrics and variables named in the vector are calculated. If not specified, var.metr is set to NULL and all possible metrics and variables are computed. The arguments dbh.min, h.min and max.dist can optionally define the minimum dbh, height and maximum distance of a tree to be included in the calculations. The default values are dbh.min = 4 (in cm), h.min = 1.3 (in m) and max.dist = NULL (no maximal distance is considered).

The argument dir.data should specify the working directory of the .txt files with the normalized reduced point clouds (output of normalize function). If not specified, it is set to NULL and the current working directory is assigned to it. The output files will be saved by default, since the argument save.result is set to TRUE, to the directory path indicated in dir.result. For each plot design (circular fixed area, k-tree and angle-count plots), a .csv file is created using the write.csv function from the utils package.

Output of the simulations function

The simulations function generates a list with one element for each plot design. The elements are data frames containing the simulated plot. Each row represents a simulated plot defined by their respective plot identification number id and their size determined by either radius, k or BAF depending on the plot design. The columns N, G, V, V.user, W.user, d, dg, dgeom, dharm, h, hg, hgeom, hharm, d.0, dg.0, dgeom.0, dharm.0, h.0, hg.0, hgeom.0 and hharm.0 display the stand-level variables based on the field data. The remaining columns contain the stand-level variables and metrics estimated for each plot based on the TLS data. As an example the data frame for circular fixed area plots is shown below.

head(simulations$fixed.area)
id radius N G V V.user W.user d dg dgeom dharm h hg hgeom hharm d.0 dg.0 dgeom.0 dharm.0 h.0 hg.0 hgeom.0 hharm.0 N.tls N.hn N.hr N.hn.cov N.hr.cov N.sh G.tls G.hn G.hr G.hn.cov G.hr.cov G.sh V.tls V.hn V.hr V.hn.cov V.hr.cov V.sh d.tls dg.tls dgeom.tls dharm.tls h.tls hg.tls hgeom.tls hharm.tls d.0.tls dg.0.tls dgeom.0.tls dharm.0.tls h.0.tls hg.0.tls hgeom.0.tls hharm.0.tls n.pts n.pts.est n.pts.red n.pts.red.est P01 P05 P10 P20 P25 P30 P40 P50 P60 P70 P75 P80 P90 P95 P99 mean.z mean.q.z mean.g.z mean.h.z median.z mode.z max.z min.z var.z sd.z CV.z D.z ID.z kurtosis.z skewness.z p.a.mean.z p.a.mode.z p.a.2m.z p.b.mean.z p.b.mode.z p.b.2m.z CRR.z L2.z L3.z L4.z L3.mu.z L4.mu.z L.CV.z median.a.d.z mode.a.d.z weibull_c.z weibull_b.z mean.rho mean.q.rho mean.g.rho mean.h.rho median.rho mode.rho max.rho min.rho var.rho sd.rho CV.rho D.rho ID.rho kurtosis.rho skewness.rho p.a.mean.rho p.a.mode.rho p.b.mean.rho p.b.mode.rho CRR.rho L2.rho L3.rho L4.rho L3.mu.rho L4.mu.rho L.CV.rho median.a.d.rho mode.a.d.rho weibull_c.rho weibull_b.rho mean.r mean.q.r mean.g.r mean.h.r median.r mode.r max.r min.r var.r sd.r CV.r D.r ID.r kurtosis.r skewness.r p.a.mean.r p.a.mode.r p.b.mean.r p.b.mode.r CRR.r L2.r L3.r L4.r L3.mu.r L4.mu.r L.CV.r median.a.d.r mode.a.d.r weibull_c.r weibull_b.r
15 2.3 601.7200 47.19093 NA 370.4402 167.4819 31.6 31.6 31.6 31.6 18.1 18.1 18.1 18.1 31.6 31.6 31.6 31.6 18.1 18.1 18.1 18.1 601.7200 652.0533 640.9386 666.3174 647.7305 601.7200 47.44623 51.41507 50.53866 52.53981 51.07421 47.44623 305.3252 330.8654 325.2255 338.1032 328.6718 305.3252 31.68536 31.68536 31.68536 31.68536 15.66288 15.66288 15.66288 15.66288 31.68536 31.68536 31.68536 31.68536 15.66288 15.66288 15.66288 15.66288 8846.000 948.9424 78.66667 46.57886 2.377645 8.730885 9.665885 11.191585 11.855885 12.538885 13.07788 13.33788 13.49288 13.76688 14.19088 14.50588 14.89188 15.24188 15.55588 12.65725 12.88703 12.218428 10.691051 13.32388 13.42188 16.80688 0.1038848 5.869576 2.422721 0.1914097 16.703 2.474 8.906917 -2.042117 64.77496 44.43051 99.15266 35.22504 55.47763 0.8473409 0.7530991 36161289 483732285 6563685850 -889371137 16832256742 4.0e-07 1.2313659 0.7646341 6.080405 13.63338 1.195454 1.358817 0.9594097 0.6672927 1.149920 0.1000019 2.299987 0.1000019 0.4172767 0.6459696 0.5403551 2.199986 1.1690441 1.719603 -0.0014461 48.05226 99.99954 51.94774 0 0.5197653 402031.8 697757.3 1288562.3 -744070.6 1399295 3.0e-06 0.5850529 1.095452 1.927658 1.347781 12.75187 12.95847 12.43067 11.842831 13.36836 13.175264 16.86079 2.141278 5.311847 2.304744 0.1807378 14.71951 2.409934 7.879725 -1.8833490 64.53568 57.89014 35.46432 42.109397 0.7563032 36563320 490727755 6678271089 -908019862 17320804208 3.0e-07 1.2122950 0.4233976 6.470110 13.68889
15 2.4 552.6213 43.34028 NA 340.2133 153.8159 31.6 31.6 31.6 31.6 18.1 18.1 18.1 18.1 31.6 31.6 31.6 31.6 18.1 18.1 18.1 18.1 552.6213 598.8476 588.6398 611.9478 594.8775 553.2588 43.57475 47.21974 46.41484 48.25270 46.90669 43.62502 280.4115 303.8677 298.6880 310.5150 301.8531 280.7350 31.68536 31.68536 31.68536 31.68536 15.66288 15.66288 15.66288 15.66288 31.68536 31.68536 31.68536 31.68536 15.66288 15.66288 15.66288 15.66288 8846.000 948.9424 78.66667 46.57886 1.771365 8.596885 9.597885 11.070885 11.721885 12.440885 12.93788 13.30788 13.47288 13.74988 14.13188 14.47788 14.86888 15.22988 15.54788 12.52826 12.79725 11.986197 10.174728 13.29688 13.42188 16.80688 0.1038848 6.812200 2.610019 0.2083305 16.703 2.584 8.569123 -2.077106 67.33539 43.36413 98.77798 32.66461 56.54733 1.2220210 0.7454245 37175852 496112216 6718750674 -901130448 16867125435 3.0e-07 1.3146214 0.8936214 5.545583 13.56410 1.242601 1.413012 0.9951392 0.6873753 1.200359 0.1000019 2.399991 0.1000019 0.4525483 0.6727171 0.5413782 2.299989 1.1990740 1.730728 -0.0046295 48.58877 99.99956 51.41123 0 0.5177525 453231.0 818166.4 1571778.1 -871385.8 1704041 2.7e-06 0.6022707 1.142599 1.923619 1.400853 12.63695 12.87502 12.25140 11.533995 13.33124 13.175264 16.86079 2.141278 6.073652 2.464478 0.1950216 14.71951 2.502334 7.625627 -1.9153474 67.19574 56.39843 32.80426 43.601129 0.7494876 37629083 503854491 6844829818 -922692114 17430516382 3.0e-07 1.2812149 0.5383133 5.958351 13.62678
4 2.5 509.2958 53.87560 NA 385.4172 175.3602 36.7 36.7 36.7 36.7 16.6 16.6 16.6 16.6 36.7 36.7 36.7 36.7 16.6 16.6 16.6 16.6 509.2958 551.8979 542.4904 575.9218 557.5052 509.2958 51.99233 56.34144 55.38106 58.79396 56.91387 51.99233 307.1817 332.8772 327.2030 347.3672 336.2592 307.1817 36.05285 36.05285 36.05285 36.05285 13.33291 13.33291 13.33291 13.33291 36.05285 36.05285 36.05285 36.05285 13.33291 13.33291 13.33291 13.33291 4789.667 329.3798 28.66667 31.49117 1.031321 8.570371 9.334321 9.588321 9.690321 9.830321 10.10732 10.31632 10.90932 12.44052 13.63032 13.75532 14.16232 15.05532 15.22732 10.98514 11.31938 10.327489 7.877833 10.31632 10.10432 25.39632 0.1003213 7.455123 2.730407 0.2485547 25.296 3.940 6.138969 -1.128323 39.80580 60.15818 98.10148 60.19420 39.74276 1.8985157 0.4325484 8537314 103166648 1285428912 -178181402 2933538253 1.3e-06 1.3998162 0.8808162 4.571254 12.02656 1.652401 1.724023 1.5760554 1.4984207 1.593123 0.6014256 2.499977 0.6014256 0.2418330 0.4917651 0.2976065 1.898551 0.8609755 1.803844 0.1066572 46.34630 99.99850 53.65370 0 0.6609663 198044.5 381345.3 773342.6 -600392.1 1497256 8.3e-06 0.4274309 1.050975 NA NA 11.16260 11.44991 10.75379 10.078174 10.46772 9.229937 25.47742 2.165922 6.496981 2.548918 0.2283444 23.31149 3.865740 5.041541 -0.8272218 39.86133 93.85271 60.13867 6.145788 0.4381371 8735358 106260991 1331582193 -186264152 3117684225 1.3e-06 1.4198943 1.9326630 5.016992 12.15508
15 2.5 509.2958 39.94240 NA 313.5406 141.7567 31.6 31.6 31.6 31.6 18.1 18.1 18.1 18.1 31.6 31.6 31.6 31.6 18.1 18.1 18.1 18.1 1018.5916 1103.7959 1084.9808 1128.4979 1096.9222 1021.4796 80.60286 87.34522 85.85635 89.29992 86.80129 80.83139 489.5223 530.4704 521.4281 542.3418 527.1670 490.9102 31.74165 31.74170 31.74160 31.74155 14.60305 14.64146 14.56454 14.52613 31.79794 31.79794 31.79794 31.79794 13.54322 13.54322 13.54322 13.54322 16284.333 1901.2564 159.00000 93.32322 1.792885 7.874885 9.541885 10.992885 11.572885 12.155885 12.78188 13.28988 13.45988 13.74088 14.07388 14.45688 14.84788 15.21988 15.54688 12.44025 12.72984 11.867501 10.060260 13.27388 13.42188 16.80688 0.1038848 7.289108 2.699835 0.2170241 16.703 2.708 7.842329 -1.990966 67.41981 42.60774 98.78695 32.58019 57.30680 1.2130515 0.7401879 38112617 507569027 6864302684 -914818813 16996906684 3.0e-07 1.3685000 0.9816326 5.303764 13.50307 1.284677 1.461601 1.0268679 0.7050419 1.254695 0.1000019 2.499993 0.1000019 0.4858826 0.6970528 0.5425897 2.399991 1.2226520 1.743550 -0.0036619 48.93449 99.99957 51.06551 0 0.5138724 502435.2 938789.1 1867524.2 -997608.2 2018654 2.6e-06 0.6120174 1.184675 1.918868 1.448185 12.55790 12.81348 12.14659 11.399583 13.30035 13.175264 16.86079 2.141278 6.484297 2.546428 0.2027749 14.71951 2.632072 7.041678 -1.8446704 67.53461 55.23912 32.46539 44.760451 0.7447994 38615052 516063320 7001932011 -938705093 17616946668 3.0e-07 1.3164067 0.6173601 5.711182 13.57363
16 2.5 509.2958 44.62240 NA 315.3808 142.6170 33.4 33.4 33.4 33.4 16.3 16.3 16.3 16.3 33.4 33.4 33.4 33.4 16.3 16.3 16.3 16.3 509.2958 551.8979 542.4904 560.9141 545.7762 509.2958 36.97955 40.07286 39.38979 40.72751 39.62836 36.97955 223.4253 242.1147 237.9876 246.0700 239.4291 223.4253 30.40541 30.40541 30.40541 30.40541 13.88834 13.88834 13.88834 13.88834 30.40541 30.40541 30.40541 30.40541 13.88834 13.88834 13.88834 13.88834 6543.000 701.8662 76.00000 48.94279 1.993708 8.709428 9.048278 10.578278 10.935278 11.040278 11.32528 11.53228 11.88528 12.17028 12.36828 12.46028 13.03828 13.39013 14.57028 11.24201 11.42693 10.864856 9.377652 11.53228 12.44228 14.95028 0.1022783 4.192004 2.047439 0.1821239 14.848 1.433 11.174777 -2.328909 63.87087 21.11548 98.99485 36.12913 78.80449 1.0051478 0.7519600 23006365 271722610 3250568113 -504187974 8477340500 5.0e-07 0.9082672 1.2002672 6.416880 12.07346 1.666882 1.754031 1.5649729 1.4519699 1.711381 0.4711111 2.499980 0.4711111 0.2981307 0.5460135 0.3275658 2.028868 0.9584047 1.812542 -0.1768557 51.85337 99.99943 48.14663 0 0.6667582 542079.6 1073627.0 2230477.3 -1637111.7 4109010 3.1e-06 0.4782448 1.195771 NA NA 11.40313 11.56077 11.15966 10.725494 11.66432 12.452193 14.99740 1.011622 3.620018 1.902634 0.1668519 13.98578 1.434399 9.544430 -2.0548727 63.57177 24.37327 36.42823 75.626160 0.7603404 23548444 280578619 3385015055 -524996481 8959290280 5.0e-07 0.8834391 1.0490613 7.052879 12.18540
4 2.6 470.8726 49.81102 NA 356.3398 162.1304 36.7 36.7 36.7 36.7 16.6 16.6 16.6 16.6 36.7 36.7 36.7 36.7 16.6 16.6 16.6 16.6 470.8726 510.2607 501.5629 532.4721 515.4449 470.8726 48.06983 52.09083 51.20290 54.35832 52.62007 48.06983 284.0068 307.7637 302.5176 321.1605 310.8905 284.0068 36.05285 36.05285 36.05285 36.05285 13.33291 13.33291 13.33291 13.33291 36.05285 36.05285 36.05285 36.05285 13.33291 13.33291 13.33291 13.33291 4789.667 329.3798 28.66667 31.49117 1.020311 3.474271 9.074321 9.504321 9.622321 9.736321 10.05832 10.26632 10.67532 12.05732 13.16832 13.71432 14.11032 15.04232 15.21632 10.71286 11.11395 9.941124 7.505212 10.26632 10.10432 25.39632 0.1003213 8.754678 2.958831 0.2761944 25.296 3.546 5.183404 -1.103698 39.41681 57.72839 97.63583 60.58319 42.17849 2.3641746 0.4218271 8887130 106645243 1321815981 -178971929 2871479954 1.2e-06 1.2295351 0.6085351 4.069698 11.80746 1.718871 1.798301 1.6331893 1.5455674 1.658942 0.6014256 2.599992 0.6014256 0.2793730 0.5285575 0.3075028 1.998566 0.9464402 1.746623 0.0653677 47.04860 99.99861 52.95140 0 0.6611062 232674.8 469732.1 998958.0 -730071.4 1893946 7.4e-06 0.4700968 1.117445 NA NA 10.91947 11.25850 10.43168 9.658859 10.40875 9.229937 25.47742 2.165922 7.519064 2.742091 0.2511195 23.31149 3.591344 4.430643 -0.8518254 39.22084 90.48771 60.77916 9.510904 0.4285940 9119804 110134265 1372747437 -188613360 3086661530 1.2e-06 1.2649991 1.6895310 4.519929 11.96251

As described above, plots with increasing sizes are estimated and the corresponding variables an metrics are calculated. The plots are ordered from the smallest to the biggest. Plots with small radius can not be simulated for all sample plots (see table above), since trees not always enter, because the plots are too small. But plots with e.g. a radius of 20 m, can be simulated for all sample plots (see end of table below).

tail(simulations$fixed.area)
id radius N G V V.user W.user d dg dgeom dharm h hg hgeom hharm d.0 dg.0 dgeom.0 dharm.0 h.0 hg.0 hgeom.0 hharm.0 N.tls N.hn N.hr N.hn.cov N.hr.cov N.sh G.tls G.hn G.hr G.hn.cov G.hr.cov G.sh V.tls V.hn V.hr V.hn.cov V.hr.cov V.sh d.tls dg.tls dgeom.tls dharm.tls h.tls hg.tls hgeom.tls hharm.tls d.0.tls dg.0.tls dgeom.0.tls dharm.0.tls h.0.tls hg.0.tls hgeom.0.tls hharm.0.tls n.pts n.pts.est n.pts.red n.pts.red.est P01 P05 P10 P20 P25 P30 P40 P50 P60 P70 P75 P80 P90 P95 P99 mean.z mean.q.z mean.g.z mean.h.z median.z mode.z max.z min.z var.z sd.z CV.z D.z ID.z kurtosis.z skewness.z p.a.mean.z p.a.mode.z p.a.2m.z p.b.mean.z p.b.mode.z p.b.2m.z CRR.z L2.z L3.z L4.z L3.mu.z L4.mu.z L.CV.z median.a.d.z mode.a.d.z weibull_c.z weibull_b.z mean.rho mean.q.rho mean.g.rho mean.h.rho median.rho mode.rho max.rho min.rho var.rho sd.rho CV.rho D.rho ID.rho kurtosis.rho skewness.rho p.a.mean.rho p.a.mode.rho p.b.mean.rho p.b.mode.rho CRR.rho L2.rho L3.rho L4.rho L3.mu.rho L4.mu.rho L.CV.rho median.a.d.rho mode.a.d.rho weibull_c.rho weibull_b.rho mean.r mean.q.r mean.g.r mean.h.r median.r mode.r max.r min.r var.r sd.r CV.r D.r ID.r kurtosis.r skewness.r p.a.mean.r p.a.mode.r p.b.mean.r p.b.mode.r CRR.r L2.r L3.r L4.r L3.mu.r L4.mu.r L.CV.r median.a.d.r mode.a.d.r weibull_c.r weibull_b.r
2592 11 20 286.4789 24.66506 NA 168.9124 76.25320 32.78889 33.10929 32.47470 32.16775 15.72500 15.77696 15.67285 15.62057 38.00919 38.13158 37.88871 37.77067 16.04577 16.07842 16.01360 15.98188 246.6902 267.3256 262.7688 267.5721 260.9481 268.1837 20.67144 22.40059 22.01876 22.42125 21.86619 22.47250 105.2404 114.0437 112.0997 114.1488 111.3230 114.4097 31.88444 32.66364 31.11494 30.35156 12.52636 12.64226 12.40882 12.29025 38.59409 38.96980 38.25430 37.95017 12.72216 12.85684 12.58955 12.46085 14306.67 9489.222 1477.667 1621.531 0.5021621 2.393162 4.669162 7.222162 7.853162 8.283162 9.249162 10.04016 10.82816 11.66416 12.07016 12.61816 13.12516 13.52416 15.03016 9.49858 10.06128 8.421981 5.558137 10.01316 12.93516 17.77316 0.1001621 11.00627 3.317570 0.3492701 17.673 4.183 3.271074 -0.8290028 57.06113 13.90806 95.73192 42.93887 86.05564 4.268084 0.5344339 143625114 1617942623 18933246905 -2474759520 35210342467 1e-07 2.178582 3.436582 3.136080 10.61543 8.880421 10.66986 5.735646 2.062062 8.798023 0.1000025 19.99997 0.1000025 34.98400 5.914727 0.6660413 19.89997 10.625443 1.780505 0.1234897 49.48591 99.99993 50.51409 0.00000 0.4440216 161525641 2352240296 36689577415 -1951005563 29563316666 1e-07 5.346583 8.780419 1.531642 9.861021 14.14843 14.66544 13.60297 13.00953 13.24558 13.126543 24.85426 0.7233835 14.89716 3.859685 0.2727996 24.13088 5.474840 2.582627 0.2993191 42.05094 52.34683 57.94906 47.653104 0.5692555 305150756 4939910203 84434610967 -8012293611 171373435093 0 2.697632 1.021884 4.125655 15.58188
2593 12 20 310.3521 24.82251 NA 170.4284 76.73561 31.55128 31.91174 31.19873 30.85627 15.68462 15.70780 15.66138 15.63810 37.23372 37.36789 37.10049 36.96879 16.14607 16.16621 16.12614 16.10643 270.5634 293.1958 288.1980 304.5649 295.1203 297.1545 19.50724 21.13901 20.77867 21.95870 21.27776 21.42442 111.7287 121.0747 119.0109 125.7695 121.8694 122.7094 29.60159 30.29831 28.92341 28.25473 13.58973 13.80062 13.31922 12.95914 36.09920 36.46745 35.77517 35.49099 13.84097 14.06525 13.58279 13.29056 16939.33 19294.164 1490.000 1613.749 0.5644229 2.721423 5.457423 8.164423 8.715423 9.212423 10.146423 10.84342 11.37242 11.94142 12.35942 12.80442 13.58742 14.33742 15.70842 10.14686 10.66756 9.107510 6.167882 10.84642 11.38842 17.56642 0.1004229 10.83812 3.292130 0.3244483 17.466 3.679 3.911117 -1.0268917 59.70584 39.76662 96.21444 40.29416 60.20385 3.785555 0.5776279 163013698 1916661472 23303958692 -3045566143 46213636183 1e-07 1.890433 1.241567 3.404298 11.29385 9.878952 11.45902 7.054779 2.883480 10.157619 0.1000062 19.99996 0.1000062 33.71541 5.806498 0.5877645 19.89996 9.959259 1.849957 -0.0452050 51.67016 99.99993 48.32984 0.00000 0.4939485 188100004 2799805810 44436347633 -2774885099 43943976133 1e-07 4.804118 9.778946 1.756490 11.094596 15.14013 15.65586 14.56458 13.87156 14.68458 10.775887 25.97714 1.2198881 15.88244 3.985278 0.2632262 24.75725 6.474497 2.526015 0.0532473 45.90094 86.91670 54.09906 13.083229 0.5828251 351113703 6009657028 107764607179 -9938054762 226717545221 0 3.238900 4.364241 4.291552 16.63624
2594 13 20 358.0986 26.99181 NA 196.0309 88.25248 30.65111 30.97916 30.32416 29.99877 16.56222 16.62685 16.49787 16.43399 36.28503 36.40635 36.16509 36.04694 17.45026 17.50284 17.39668 17.34230 302.3944 327.6894 322.1037 319.2992 312.3916 329.9294 19.13096 20.73125 20.37787 20.20044 19.76343 20.87296 116.4661 126.2083 124.0570 122.9769 120.3164 127.0711 27.94889 28.38158 27.52482 27.10506 13.29158 13.46659 13.09115 12.85988 33.46795 33.68225 33.26821 33.08354 14.06129 14.12751 13.99343 13.92397 13482.83 12896.469 1497.000 1733.688 0.5839766 2.515977 4.847977 7.940977 8.712977 9.316977 10.585977 11.26498 11.79598 12.33498 12.65098 12.98998 14.02898 14.87498 16.40398 10.36471 10.95360 9.209582 6.169624 11.26498 11.85198 18.91098 0.1009766 12.55429 3.543204 0.3418528 18.810 3.938 3.606383 -0.9505251 62.08749 38.80790 96.01262 37.91251 61.16682 3.987381 0.5480789 163733253 1994489142 25175254059 -3096650018 48022413768 1e-07 2.085730 1.487270 3.211988 11.57012 10.192868 11.55672 8.352770 6.224184 10.326873 12.9301134 19.99992 0.5452360 29.66316 5.446390 0.5343334 19.45469 9.259102 1.789574 0.0776622 50.49767 35.36630 49.50233 64.63355 0.5096453 182260169 2700089521 42811018983 -2873169629 46339395013 1e-07 4.592679 2.737246 1.951828 11.495426 15.43982 15.92291 14.90906 14.29985 14.96997 11.396027 26.89555 1.5368466 15.15112 3.892444 0.2521043 25.35870 5.719222 2.619597 0.0726934 46.67663 86.39759 53.32337 13.602339 0.5740659 345993422 5986394767 108307225542 -10039825066 233475740813 0 2.852620 4.043792 4.500527 16.91888
2595 14 20 326.2676 26.33464 NA 190.6221 86.02561 31.82439 32.05765 31.58643 31.34362 16.50488 16.57180 16.43725 16.36921 36.37367 36.43150 36.31820 36.26505 17.35692 17.41033 17.30122 17.24326 294.4366 319.0660 313.6273 335.2315 324.0009 324.7324 20.78783 22.52671 22.14273 23.66803 22.87513 22.92677 133.1653 144.3044 141.8446 151.6156 146.5363 146.8672 29.57624 29.98221 29.17425 28.77995 13.56195 13.83470 12.96293 11.22274 35.30336 35.40847 35.20389 35.11000 14.00347 14.03960 13.96453 13.92260 19814.83 18617.554 1682.667 1671.390 0.6580498 2.916050 5.734050 8.514050 9.117050 9.704050 10.624050 11.25405 11.90805 12.56405 12.91605 13.33705 14.20605 15.00805 16.12849 10.62652 11.15814 9.579726 6.670702 11.25505 11.93805 19.48105 0.1000498 11.58134 3.403137 0.3202495 19.381 3.797 3.962885 -1.0493788 59.99224 39.40131 96.55972 40.00776 60.57505 3.440279 0.5454797 209548159 2571423379 32604053775 -4108875553 65279590316 1e-07 1.985467 1.311533 3.453984 11.81880 10.272576 11.72271 7.958948 4.273000 9.915262 0.1000310 20.00000 0.1000310 31.89605 5.647659 0.5497802 19.89996 9.349072 1.922040 0.0445287 47.53767 99.99994 52.46233 0.00000 0.5136289 231289370 3492362794 56577489750 -3635448269 59517213867 0e+00 4.564619 10.172546 1.891084 11.574738 15.68085 16.18413 15.12598 14.47567 15.29121 8.591632 26.04295 1.3022404 16.03686 4.004605 0.2553818 24.74070 5.814128 2.589608 0.0746890 46.22417 97.15762 53.77583 2.842321 0.6021153 440837529 7767266054 143208442522 -12970854029 306401917451 0 2.912542 7.089223 4.437006 17.19718
2596 15 20 334.2254 26.67290 NA 192.9812 87.05307 31.64286 31.87649 31.40932 31.17674 16.51905 16.58523 16.44784 16.37013 36.27554 36.33279 36.22188 36.17161 17.47622 17.52059 17.43296 17.39087 286.4789 310.4426 305.1509 317.7241 308.7757 321.8674 19.83785 21.49727 21.13083 22.00149 21.38184 22.28840 118.6425 128.5669 126.3754 131.5825 127.8766 133.2984 29.07572 29.69313 28.33710 27.36180 14.05670 14.19939 13.90139 13.73296 35.03998 35.26973 34.82841 34.63468 14.84019 14.92174 14.75281 14.65925 26649.33 31348.314 1499.333 1538.733 0.6268848 2.762885 5.611885 8.936885 9.566885 10.087885 11.014885 11.81988 12.50988 13.18288 13.43988 13.73988 14.61388 15.13688 16.26188 10.98030 11.53921 9.835037 6.622515 11.79788 13.40388 20.24488 0.1008848 12.58626 3.547713 0.3230979 20.144 3.885 4.029200 -1.1547797 60.21843 25.73927 96.30853 39.78157 74.23540 3.691471 0.5423741 183999316 2331062907 30421492311 -3730038284 61143849381 1e-07 2.145583 2.423583 3.420151 12.21856 9.454602 11.09696 6.703109 2.942147 9.331808 0.1000019 20.00000 0.1000019 33.75295 5.809729 0.6144868 19.90000 10.311969 1.772222 0.0491850 49.35902 99.99993 50.64098 0.00000 0.4727302 170165718 2504137407 39351537599 -2322408477 35915196072 1e-07 5.156078 9.354600 1.672646 10.584194 15.54640 16.00924 15.01861 14.35168 15.08796 13.175264 27.73244 2.1412785 14.60513 3.821665 0.2458232 25.59116 4.946564 3.094255 0.0072482 44.61397 75.04235 55.38603 24.957575 0.5605854 354165034 6134073136 110934482668 -10383894314 243073389740 0 2.435429 2.371137 4.627124 17.00824
2597 16 20 310.3521 23.85538 NA 169.8424 76.46164 30.97692 31.28390 30.67259 30.37392 16.18974 16.25163 16.12409 16.05316 36.18010 36.25185 36.10918 36.03926 16.93134 16.98705 16.87890 16.82953 286.4789 310.4426 305.1509 306.9831 299.8390 321.6980 19.47637 21.10555 20.74579 20.87036 20.38466 21.87076 117.7094 127.5557 125.3814 126.1342 123.1988 132.1803 28.58607 29.42136 27.72079 26.84063 13.61346 13.83502 13.32353 12.90901 36.75310 36.89924 36.60409 36.45256 14.10424 14.27170 13.91359 13.69737 22583.17 23755.300 1547.500 1656.513 0.6342783 2.767278 5.449278 8.773278 9.430278 9.909278 10.720278 11.25628 11.79928 12.29028 12.57728 12.91328 13.83128 14.56328 16.18528 10.52075 11.03130 9.478041 6.516683 11.25628 11.93028 19.80828 0.1002783 11.00349 3.317152 0.3152961 19.708 3.147 4.307389 -1.1748504 62.64542 37.04686 96.39700 37.35458 62.92384 3.603000 0.5311290 167791949 2025414239 25199810395 -3270475421 51397780150 1e-07 1.764473 1.409527 3.514336 11.69047 10.056586 11.67950 7.728056 5.116575 9.874306 0.4711111 19.99999 0.4711111 35.27585 5.939348 0.5905928 19.52887 10.921429 1.671198 0.0747097 48.79519 99.99993 51.20481 0.00000 0.5028297 188090114 2891434411 47354230742 -2783197025 45177243715 1e-07 5.453410 9.585475 1.747224 11.290656 15.48125 16.06551 14.82867 14.05312 14.96558 12.452193 27.16936 1.0116216 18.43143 4.293184 0.2773151 26.15774 6.649824 2.492025 0.0921677 45.78776 72.92992 54.21224 27.070003 0.5698053 355882063 6306440986 117538910598 -10222046744 238775893666 0 3.276241 3.029054 4.051525 17.06743

Calculation of relative bias

In order to estimate the goodness of the TLS-based estimation of the variables, the function relative.bias computes the relative bias between the variables estimated from field data and their respective TLS-based estimates. The relative bias is calculated for each sample plot and each simulated plot (i.e. different plot sizes and designs). Therefore, the input data for this function (introduced in simulations) must be a list of data frames containing the estimated variables (based on field and TLS data) for all the simulated plots. Thus, a similar list to the output of the simulations function (see above) is required, that has the same description and format.

Optionally, the variables for which the relative bias will be computed can be specified in a vector in variables. Only, the names of the field data based estimates can be introduced. If not otherwise specified, the argument will be set to c("N", "G", "V", "d", "dg", "d.0", "h", "h.0") by default. Other possible variables are dgeom, dharm, dg.0, dgeom.0, dharm.0, hg, hgeom, hharm, hg.0, hgeom.0 or hharm.0.

The arguments save.result and dir.result define whether and to which directory the output files should be saved. Two different output files are generated. First, the data frames for each plot design (as shown below for circular fixed areas) are saved as .csv files using the write.csv function from the utils package. Second, interactive line charts representing the relative biases are saved as .html files by means of the saveWidget function in the htmlwidgets package. An example of these interactive line charts is provided below.

bias <- relative.bias(simulations = simulations,
              variables = c("N", "G", "d", "dg", "d.0", "h", "h.0"),
              save.result = FALSE, dir.result = NULL)
#> Computing relative bias for fixed area plots
#>  (0.33 secs)
#> Computing relative bias for k-tree plots
#>  (0.09 secs)
#> Computing relative bias for angle-count plots
#>  (0.04 secs)

The function calculates the relative bias between the field data estimates (specified in variables) and the counterpart variables that are estimated based on TLS data. The TLS counterparts for the density (N) are the variables N.tls, N.hn, N.hr, N.hn.cov, N.hr.cov and N.sh for circular fixed area and k-tree plots, and N.tls and N.pam for angle-count plots. The same pattern applies to the basal area (G) and the volume (V) where the corresponding TLS-based estimates are G.tls, G.hn, G.hr, G.hn.cov, G.hr.cov, G.sh and G.pam, and V.tls, V.hn, V.hr, V.hn.cov, V.hr.cov, V.sh and V.pam respectively. In case of mean and dominant diameters (d, dg, dgeom, dharm, d.0, dg.0, dgeom.0, and dharm.0) and heights (h, hg, hgeom, hharm, h.0, hg.0, hgeom.0 and hharm.0), for all three plot designs their respective counterpart variables are d.tls, dg.tls, dgeom.tls, dharm.tls, d.0.tls, dg.0.tls, dgeom.0.tls and dharm.0.tls (for the diameter), and h.tls, hg.tls, hgeom.tls, hharm.tls, h.0.tls, hg.0.tls, hgeom.0.tls, hharm.0.tls and in addition P99 (for the height). The relative bias are calculated as follows

1nni=1yi1nni=1xini=1xi

where xi is the value of the field estimate and yi the value of its TLS counterpart corresponding to plot i of n sample plots. For each plot size defined by the radius, k or BAF, the biases are calculated and stored as a data frame (shown below). Each row represents the a simulated plot of a certain size (here defined by radius) and the columns contain the calculate bias between the variables indicated in the column names. The two compared variables are joint with . as separation, e.g. N.N.tls means that the bias between N and N.tls was calculated.

head(bias$fixed.area)
radius N.N.tls N.N.hn N.N.hr N.N.hn.cov N.N.hr.cov N.N.sh G.G.tls G.G.hn G.G.hr G.G.hn.cov G.G.hr.cov G.G.sh d.d.tls dg.dg.tls d.0.d.0.tls h.h.tls h.P99 h.0.h.0.tls h.0.P99
2.3 0.00000 8.364909 6.517745 10.73546 7.646492 0.0000000 0.5410116 8.951175 7.094018 11.33455 8.228872 0.5410116 0.2701409 0.2701409 0.2701409 -13.46473 -14.055885 -13.46473 -14.055885
2.4 0.00000 8.364909 6.517745 10.73546 7.646492 0.1153589 0.5410116 8.951175 7.094018 11.33455 8.228872 0.6569945 0.2701409 0.2701409 0.2701409 -13.46473 -14.100084 -13.46473 -14.100084
2.5 33.33333 44.486545 42.023660 48.26575 44.002986 33.5223488 22.4893511 32.735473 30.472894 36.39183 32.434984 22.6544241 -3.4415766 -3.4415275 -3.3862281 -17.99157 -11.089246 -20.06967 -11.089246
2.6 33.33333 44.486545 42.023660 48.26575 44.002986 33.6217731 22.4893511 32.735473 30.472894 36.39183 32.434984 22.7412544 -3.4415766 -3.4415275 -3.3862281 -17.99157 -11.148070 -20.06967 -11.148070
2.7 25.00000 35.456136 33.147181 38.85222 34.896915 25.3688041 14.0877969 23.631137 21.523748 26.81737 23.189314 14.3953019 -6.3123219 -6.3469648 -6.9543503 -15.54390 -9.515296 -16.97665 -7.764574
2.8 20.00000 30.037890 27.821294 33.78289 29.874007 20.4598114 16.0838779 25.794188 23.649929 29.58260 25.764667 16.4825383 -1.9701624 -1.9982617 -2.5208152 -15.02283 -10.723396 -16.11088 -9.402325

For better visualization, line charts are created that show the relative bias of a given variable and plot design. As an example, the interactive graphic showing the relative bias of basal area estimations (G) for fixed are plots can be seen when following the link (RB.G.fixed.area.html).

Functions facilitating model-based or model-assisted sampling approaches

To facilitate the application of model-based sampling, two additional functions are included in the FORTLS package. The function correlations computes the correlations between variables estimated from field data and those estimated from TLS data and calculates the respective Pearson and Spearman correlation coefficients. The results are saved as .csv files and represented as line charts and heat maps (when applying the function optimize.plot.design).

Computing correlations

The correlations function computes the correlations for all the plot designs that are introduces as elements of a list in simulations. The format and description must be the same as the output list of the simulations function. Also similar to the function relative.bias, the variables for which the correlations are to be calculated can be specified in variables. By default, this argument is set to variables = c("N", "G", "V", "d", "dg", "d.0", "h", "h.0"). If only one of the two above-mentioned correlation measures should be calculated, it can be specified in method. This argument is set to method = c("pearson", "spearman") by default and both correlation coefficients are computed.

cor <- correlations(simulations = simulations,
             variables = c("N", "G", "d", "dg", "d.0", "h", "h.0"),
             method = c("pearson", "spearman"), 
             save.result = FALSE, dir.result = NULL)
#> Computing correlations for fixed area plots
#>  (133.3 secs)
#> Computing correlations for k-tree plots
#>  (34.51 secs)
#> Computing correlations for angle-count plots
#>  (25.35 secs)

In addition to the calculation of the correlation measures, the function also performs tests of association and returns the p-values. The output of this function is a list containing the following three elements correlations, correlations.pval and opt.correlations. Each of them is a list including, if not otherwise specified (in method), two elements pearson and spearman. These two elements are lists again that include separate data frames for each plot design (circular fixed area, k-tree and angle-count plots). The data frames contain the corresponding correlation coefficients (in correlations), the calculated p-values (in correlations.pval) and the optimal correlations for a given plot size and field data estimate (in opt.correlations).

cor$correlations$pearson$fixed.area[20:26,1:15]
radius N.N.tls N.N.hn N.N.hr N.N.hn.cov N.N.hr.cov N.N.sh N.n.pts N.n.pts.est N.n.pts.red N.n.pts.red.est N.G.tls N.G.hn N.G.hr N.G.hn.cov
4.4 0.1555428 0.1555428 0.1555428 0.1372168 0.1408288 0.1544990 0.0271501 0.0332394 0.1298362 0.1013424 0.1521372 0.1521372 0.1521372 0.1350838
4.5 0.6296296 0.6296296 0.6296296 0.6066506 0.6109308 0.6252431 0.1859822 0.3006191 0.6592928 0.5555128 0.4753166 0.4753166 0.4753166 0.4514592
4.6 0.6567896 0.6567896 0.6567896 0.6638500 0.6628032 0.6622937 0.5553195 0.6864496 0.8267278 0.5974032 0.6008273 0.6008273 0.6008273 0.5976685
4.7 0.8134056 0.8134056 0.8134056 0.8039314 0.8062763 0.8155951 0.4285767 0.6476647 0.9025544 0.7525860 0.6419357 0.6419357 0.6419357 0.6146723
4.8 0.4823819 0.4823819 0.4823819 0.5034869 0.4998857 0.4905147 0.4390297 0.5780223 0.6679551 0.4185965 0.4093349 0.4093349 0.4093349 0.4140560
4.9 0.4823819 0.4823819 0.4823819 0.5034869 0.4998857 0.4904571 0.4390297 0.5780223 0.6679551 0.4185965 0.4093349 0.4093349 0.4093349 0.4140560
5.0 0.4823819 0.4823819 0.4823819 0.5034869 0.4998857 0.4903362 0.4390297 0.5780223 0.6679551 0.4185965 0.4093349 0.4093349 0.4093349 0.4140560

All mentioned data frames are divided into rows each of which represent a given plot size defined by radius (for circular fixed area plots), k (for k-tree plots) or BAF (for angle-count plots). The columns of the data frames in correlations (shown above) and correlations.pval (shown below) contain the calculated coefficients and p-values respectively for the corresponding correlation. The column names are composed of the two variables (e.g. N and N.tls) separated by . (giving N.N.tls) that were correlated as described for the relative.bias function.

cor$correlations.pval$pearson$fixed.area[20:26,1:15]
radius N.N.tls N.N.hn N.N.hr N.N.hn.cov N.N.hr.cov N.N.sh N.n.pts N.n.pts.est N.n.pts.red N.n.pts.red.est N.G.tls N.G.hn N.G.hr N.G.hn.cov
4.4 0.6479016 0.6479016 0.6479016 0.6874497 0.6795955 0.6501333 0.9368433 0.9227115 0.7035846 0.7668590 0.6551929 0.6551929 0.6551929 0.6921009
4.5 0.0378998 0.0378998 0.0378998 0.0478264 0.0458555 0.0396724 0.5840204 0.3690477 0.0273338 0.0760317 0.1395248 0.1395248 0.1395248 0.1633616
4.6 0.0281336 0.0281336 0.0281336 0.0259190 0.0262393 0.0263962 0.0761554 0.0196589 0.0016995 0.0522820 0.0506004 0.0506004 0.0506004 0.0521504
4.7 0.0023238 0.0023238 0.0023238 0.0028619 0.0027209 0.0022111 0.1884480 0.0311891 0.0001429 0.0075241 0.0332223 0.0332223 0.0332223 0.0441791
4.8 0.1122249 0.1122249 0.1122249 0.0951647 0.0979437 0.1054284 0.1533283 0.0490063 0.0176000 0.1756372 0.1863830 0.1863830 0.1863830 0.1808556
4.9 0.1122249 0.1122249 0.1122249 0.0951647 0.0979437 0.1054756 0.1533283 0.0490063 0.0176000 0.1756372 0.1863830 0.1863830 0.1863830 0.1808556
5.0 0.1122249 0.1122249 0.1122249 0.0951647 0.0979437 0.1055745 0.1533283 0.0490063 0.0176000 0.1756372 0.1863830 0.1863830 0.1863830 0.1808556

The data frames of the opt.correlations list (example shown below) are also divided into rows that represent the different plot sizes. For a given plot size and variable (specified in the argument variables), the best correlating TLS-based estimate and the corresponding correlation coefficient is displayed in this table. The columns named <variable>.metric (with <variable> being here N, G, d, dg, d.0, h and h.0) contain the TLS-based variable or metric that yielded the best correlation with the respective field data-based variable of the column name for a certain plot radius. The columns <variable>.cor display the measures of the respective correlations. That means, in the example shown here, the TLS-based estimate that yielded the best correlation with the field data based variable density (N) for circular fixed area plots with a radius of 4.4 m is ID.rho. And the correlation coefficient is 0.7286.

cor$opt.correlations$pearson$fixed.area[20:26,]
radius N.cor N.metric G.cor G.metric d.cor d.metric dg.cor dg.metric d.0.cor d.0.metric h.cor h.metric h.0.cor h.0.metric
20 4.4 0.7285964 ID.rho -0.5721698 mode.a.d.r 0.7948920 weibull_c.rho 0.7963612 weibull_c.rho 0.6793994 dharm.0.tls 0.9396909 hharm.tls 0.9332975 hharm.tls
21 4.5 0.6663240 ID.rho -0.6694453 p.a.mean.r 0.8430004 d.tls 0.8257065 d.tls 0.6602874 dharm.0.tls 0.9334471 hharm.tls 0.8064158 hharm.tls
22 4.6 0.8267278 n.pts.red -0.6851009 mode.a.d.r 0.8426150 dg.tls 0.8213773 dg.tls 0.7707053 dharm.0.tls 0.9458964 hharm.tls 0.8606220 hg.tls
23 4.7 0.9025544 n.pts.red 0.8108520 G.sh 0.8563306 dgeom.tls 0.8371474 d.tls 0.7855822 dharm.0.tls 0.9404119 hharm.tls 0.8738438 hg.tls
24 4.8 0.6679551 n.pts.red 0.6596760 V.hn.cov 0.7564997 d.tls 0.7460391 dg.tls 0.7842381 dharm.0.tls 0.8674555 P95 0.7627065 h.0.tls
25 4.9 0.6679551 n.pts.red 0.6596760 V.hn.cov 0.7564997 d.tls 0.7460391 dg.tls 0.7842381 dharm.0.tls 0.8685224 P95 0.7627065 h.0.tls
26 5.0 0.6679551 n.pts.red 0.6596760 V.hn.cov 0.7564997 d.tls 0.7460391 dg.tls 0.7842381 dharm.0.tls 0.8692924 P95 0.7627065 h.0.tls

The correlations functions creates different files and saves them (if save.result = TRUE, default setting) to the directory indicated in dir.result. These files are, on the one hand, .csv files of the data frames in the lists correlations and opt.correlations created by means of the write.csv function from the utils package. These .csv files will be named as correlations.<plot design>.<method>.csv and opt.correlations.<plot design>.plot.<method>.csv with <plot design> being fixed.area.plot, k.tree.plot or angle.count.plot and <method> being pearson or spearman. On the other hand, interactive line charts representing the correlation coefficients will be created for each variable (selected in variables) as .html file using the saveWidget function in the htmlwidgets package. As an example, the interactive line chart for the variable height (h) and fixed area plots (pearson measure) is shown (correlations.h.fixed.area.pearson.html).

Visualizing correlations

In order to visualize the optimal correlations, the function optimize.plot.design creates heat maps and is applied as follows:

optimize.plot.design(correlations = cor$opt.correlations,
                     variables = c("N", "G", "d", "dg", "d.0", "h", "h.0"),
                     dir.result = NULL)

The function creates the heat maps based on the optimal correlation list (opt.correlations from the output of the correlations function) introduced in correlations. The introduced list must have the same format and description as the opt.correlation list. Similar to the other functions described above, the variables of interest can be selected in variables (default setting: variables = c("N", "G", "V", "d", "dg", "d.0", "h", "h.0")). This function generates interactive heat maps with the saveWidget function of the htmlwidgets package and saves these graphics to the directory indicated in dir.result (or by default to the working directory). For each plot design and correlation measure a plot is generated and named as opt.correlations.<plot design>.<method>.html where <plot design> can be fixed.area.plot, k.tree.plot or angle.count.plot and <method> either pearson or spearman according to the plot design and correlation measure.

As an example, the heat map of the pearson correlation coefficient for fixed area plots and pearson measure is provided and can be seen when opening the link (opt.correlations.fixed.area.plot.pearson.html).