/usr/share/gretl/genrgui.hlp.it is in gretl-common 1.9.6-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 | ## Accessori
# $ahat access
Risultato: serie
Deve seguire la stima di un modello panel a effetti fissi. Produce le stime degli effetti fissi individuali (intercette delle singole unità).
# $aic access
Risultato: scalare
Produce il criterio di informazione di Akaike per l'ultimo modello stimato.
# $bic access
Risultato: scalare
Produce il criterio di informazione bayesiana di Schwarz per l'ultimo modello stimato.
# $coeff access
Risultato: scalare o matrice
Argomento: <@var="s"> (nome del coefficiente, opzionale)
L'accessorio <@lit="$coeff"> può essere usato in due modi: senza argomenti produce un vettore colonna che contiene i coefficienti dell'ultimo modello stimato. Con l'argomento opzionale, produce uno scalare che corrisponde alla stima del coefficiente chiamato <@var="s">. Vedi anche <@ref="$stderr">, <@ref="$vcv">.
Esempio:
<code>
open bjg
arima 0 1 1 ; 0 1 1 ; lg
b = $coeff
macoef = $coeff(theta_1)
</code>
Se il "modello" in questione è effettivamente un sistema (un VAR o un VECM, o un sistema di equazioni simultanee), <@lit="$coeff"> senza parametri produce la matrice dei coefficienti, una colonna per equazione.
# $compan access
Risultato: matrice
Deve seguire la stima di un VAR o un VECM; produce la matrice relativa.
# $df access
Risultato: scalare
Produce i gradi di libertà dell'ultimo modello stimato.
# $ess access
Risultato: scalare
Produce la somma dei quadrati degli errori dell'ultimo modello stimato.
# $gmmcrit access
Risultato: scalare
Deve seguire un blocco <@lit="gmm">. Produce il valore della funzione obiettivo al suo minimo.
# $h access
Risultato: serie
Deve seguire un comando <@lit="garch">. Produce la varianza condizionale stimata.
# $hausman access
Risultato: vettore riga
Deve seguire un comando <@lit="tsls">. Produce un vettore 1×3 contenente nell'ordine: il valore della statistica del test di Hausman, i corrispondenti gradi di libertà e p-value.
# $hqc access
Risultato: scalare
Produce il criterio di informazione di Hannan-Quinn per l'ultimo modello stimato.
# $jalpha access
Risultato: matrice
Deve seguire la stima di un VECM, e produce la matrice dei pesi, che contiene tante righe quante sono le variabili del VECM e tante colonne quanto è il rango di cointegrazione.
# $jbeta access
Risultato: matrice
Deve seguire la stima di un VECM, e produce la matrice di cointegrazione, che contiene tante righe quante sono le variabili del VECM e tante colonne quanto è il rango di cointegrazione.
# $jvbeta access
Risultato: matrice quadrata
Deve seguire la stima di un VECM, e produce la matrice di covarianza stimata per gli elementi dei vettori di cointegrazione.
Nel caso di stima non vincolata, ha un numero di righe pari al numero di elementi non vincolati nello spazio di cointegrazione dopo la normalizzazione di Phillips. Se però si stima un sistema vincolato con il comando <@lit="restrict"> e l'opzione <@lit="--full">, verrà prodotta una matrice singolare con <@itl="nr"> righe (<@itl="n"> è il numero delle variabili e <@itl="r"> è il rango di cointegrazione).
Esempio: il codice
<code>
open denmark.gdt
vecm 2 1 LRM LRY IBO IDE --rc --seasonals -q
s0 = $jvbeta
restrict --full
b[1,1] = 1
b[1,2] = -1
b[1,3] + b[1,4] = 0
end restrict
s1 = $jvbeta
print s0
print s1
</code>
produce il risultato seguente.
<code>
s0 (4 x 4)
0.019751 0.029816 -0.00044837 -0.12227
0.029816 0.31005 -0.45823 -0.18526
-0.00044837 -0.45823 1.2169 -0.035437
-0.12227 -0.18526 -0.035437 0.76062
s1 (5 x 5)
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.27398 -0.27398 -0.019059
0.0000 0.0000 -0.27398 0.27398 0.019059
0.0000 0.0000 -0.019059 0.019059 0.0014180
</code>
# $lnl access
Risultato: scalare
Produce la log-verosimiglianza dell'ultimo modello stimato (dove possibile).
# $ncoeff access
Risultato: scalare
Produce il numero totale dei coefficienti stimati nell'ultimo modello.
# $nobs access
Risultato: scalare
Produce il numero delle osservazioni nel campione selezionato.
# $nvars access
Risultato: scalare
Produce il numero delle variabili nel dataset (inclusa la costante).
# $pd access
Risultato: scalare
Produce la frequenza o la periodicità dei dati (es. 4 per dati trimestrali).
# $pvalue access
Risultato: scalare
Produce il p-value della statistica test generata dall'ultimo comando esplicito di test di ipotesi (es. <@lit="chow">). Si veda <@pdf="la guida all'uso di gretl"> per i dettagli. Vedi anche <@ref="$test">.
# $rho access
Risultato: scalare
Argomento: <@var="n"> (scalare, opzionale)
Senza argomenti, produce il coefficiente autoregressivo del prim'ordine per i residui dell'ultimo modello. Dopo aver stimato un modello con il comando <@lit="ar">, la sintassi <@lit="$rho(n)"> produce la corrispondente stima di ρ(<@itl="n">).
# $rsq access
Risultato: scalare
Produce l'<@itl="R"><@sup="2"> non corretto dell'ultimo modello stimato.
# $sargan access
Risultato: vettore riga
Deve seguire un comando <@lit="tsls">. Produce un vettore 1×3 che contiene nell'ordine: il valore della statistica del test di Sargan per la sovraidentificazione, i corrispondenti gradi di libertà e il p-value.
# $sigma access
Risultato: scalare
Ritorna lo scarto quadratico medio dei residui dell'ultimo modello stimato.
# $stderr access
Risultato: scalare o matrice
Argomento: <@var="s"> (nome del coefficiente, opzionale)
L'accessore <@lit="$stderr"> può usarsi in due modi: senza argomenti, ritorna un vettore colonna che contiene le stime dei coefficienti per l'ultimo modello stimato. Con il parametro opzionale, ritorna uno scalare contentente la stima del parametro <@var="s">. Vedi anche <@ref="$coeff">, <@ref="$vcv">.
# $stopwatch access
Risultato: scalare
Must be preceded by the <@lit="set stopwatch"> command, which activates the measurement of CPU time. The "clock" stops when the accessor <@lit="$stopwatch"> is used, either in assigning it to a variable or simply by printing it. The accessor <@lit="$stopwatch"> yields the seconds of CPU time that have elapsed since the <@lit="set stopwatch"> statement command.
# $T access
Risultato: scalare
Number of observations used in estimating the last model.
# $t1 access
Risultato: scalare
The 1-based index of the first observation in the currently selected sample.
# $t2 access
Risultato: scalare
The 1-based index of the last observation in the currently selected sample.
# $test access
Risultato: scalare
Returns the value of the test statistic that was generated by the last explicit hypothesis-testing command, if any (e.g. <@lit="chow">). See <@pdf="la guida all'uso di gretl"> for details. Vedi anche <@ref="$pvalue">.
# $trsq access
Risultato: scalare
Returns <@itl="TR"><@sup="2"> (sample size times R-squared) from the last model.
# $uhat access
Risultato: serie
Returns the residuals from the last model. This may have different meanings for different estimators. For example, after an ARMA estimation <@lit="$uhat"> will contain the one-step-ahead forecast error; after a probit model, it will contain the generalized residuals.
If the "model" in question is actually a system (a VAR or VECM, or system of simultaneous equations), <@lit="$uhat"> with no parameters retrieves the matrix of residuals, one column per equation.
# $vcv access
Risultato: scalare o matrice
Argomenti: <@var="s1"> (nome del coefficiente, opzionale)
<@var="s2"> (nome del coefficiente, opzionale)
The <@lit="$stderr"> accessor can be used in two ways: with no arguments, it returns a square matrix containing the estimated covariance matrix for the coefficients of the last model. With the optional arguments, it returns a scalar, which is the estimated covariance between the parameters named <@var="s1"> and <@var="s2">. Vedi anche <@ref="$coeff">, <@ref="$stderr">.
If the "model" in question is actually a system (a VAR or VECM, or system of simultaneous equations), <@lit="$vcv"> with no parameters returns the cross-equation covariance matrix.
# $yhat access
Risultato: serie
Returns the fitted values from the last regression.
## Functions proper
# abs math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Absolute value.
# atan math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Arctangent.
# BFGSmax numerical
Risultato: scalare
Argomenti: <@var="b"> (vettore)
<@var="s"> (stringa)
Numerical maximization via the method of Broyden, Fletcher, Goldfarb and Shanno. The vector <@var="b"> should hold the initial values of a set of parameters, and the string <@var="s"> should specify a call to a function that calculates the (scalar) criterion to be maximized, given the current parameter values and any other relevant data. If the object is in fact minimization, this function should return the negative of the criterion. On successful completion, <@lit="BFGSmax"> returns the maximized value of the criterion, and <@var="b"> holds the parameter values which produce the maximum.
For more details and examples see the chapter on special functions in <@lit="genr"> in <@pdf="la guida all'uso di gretl">. Vedi anche <@ref="fdjac">.
# bkfilt filters
Risultato: serie
Argomento: <@var="y"> (serie)
Extracts the cyclical component of series <@var="y"> via the Baxter–King bandpass filter, a two-sided symmetric filter. See <@pdf="la guida all'uso di gretl"> for details. Vedi anche <@ref="hpfilt">.
# cdemean stats
Risultato: matrice
Argomento: <@var="X"> (matrice)
Centers the columns of matrix <@var="X"> around their means.
# cdf probdist
Risultato: stesso tipo dell'argomento
Argomenti: <@var="c"> (carattere)
<@var="…"> (vedi sotto)
<@var="x"> (scalare, serie o matrice)
Esempi: <@lit="p1 = cdf(N, -2.5)">
<@lit="p2 = cdf(X, 3, 5.67)">
<@lit="p3 = cdf(D, 0.25, -1, 1)">
Cumulative distribution function calculator. Returns <@itl="P(X < x)">, where the distribution <@itl="X"> is determined by the character <@var="c">. Between the arguments <@var="c"> and <@var="x">, zero or more additional arguments are required to specify the parameters of the distribution, as follows.
<indent>
• Standard normal (c = z, n, or N): no extra arguments
</indent>
<indent>
• Bivariate normal (D): correlation coefficient
</indent>
<indent>
• Student's t (t): degrees of freedom
</indent>
<indent>
• Chi square (c, x, or X): degrees of freedom
</indent>
<indent>
• Snedecor's F (f or F): df (num.); df (den.)
</indent>
<indent>
• Gamma (g or G): shape; scale
</indent>
<indent>
• Binomial (b or B): probability; number of trials
</indent>
<indent>
• Poisson (p or P): Mean
</indent>
Note that most cases have aliases to help memorizing the codes. The bivariate normal case is special: the syntax is <@lit="x = cdf(D, rho, z1, z2)"> where <@lit="rho"> is the correlation between the variables <@lit="z1"> and <@lit="z2">.
Vedi anche <@ref="critical">, <@ref="invcdf">, <@ref="pvalue">.
# cdiv linalg
Risultato: matrice
Argomenti: <@var="X"> (matrice)
<@var="Y"> (matrice)
Complex division. The two arguments must have the same number of rows, <@itl="n">, and either one or two columns. The first column contains the real part and the second (if present) the imaginary part. The return value is an <@itl="n">×<@itl="2"> matrix or, if the result has no imaginary part, an <@itl="n">-vector. Vedi anche <@ref="cmult">.
# ceil math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Ceiling function: returns the smallest integer greater than or equal to <@var="x">. Vedi anche <@ref="floor">, <@ref="int">.
# cholesky linalg
Risultato: matrice quadrata
Argomento: <@var="A"> (matrice quadrata)
Peforms a Cholesky decomposition of the matrix <@var="A">, which is assumed to be symmetric and positive definite. The result is a lower-triangular matrix <@itl="K"> which satisfies <@itl="A = KK'">. The function will fail if <@var="A"> is not symmetric or not positive definite.
# cmult linalg
Risultato: matrice
Argomenti: <@var="X"> (matrice)
<@var="Y"> (matrice)
Complex multiplication. The two arguments must have the same number of rows, <@itl="n">, and either one or two columns. The first column contains the real part and the second (if present) the imaginary part. The return value is an <@itl="n">×<@itl="2"> matrix, or, if the result has no imaginary part, an <@itl="n">-vector. Vedi anche <@ref="cdiv">.
# cnorm probdist
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Returns the cumulative distribution function for a standard normal. Vedi anche <@ref="dnorm">, <@ref="qnorm">.
# cols matshape
Risultato: scalare
Argomento: <@var="X"> (matrice)
The number of columns of <@var="X">. Vedi anche <@ref="mshape">, <@ref="rows">, <@ref="unvech">, <@ref="vec">, <@ref="vech">.
# corr stats
Risultato: scalare
Argomenti: <@var="y1"> (serie)
<@var="y2"> (serie)
Computes the correlation coefficient between <@var="y1"> and <@var="y2">. Vedi anche <@ref="cov">, <@ref="mcov">, <@ref="mcorr">.
# cos math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Cosine.
# cov stats
Risultato: scalare
Argomenti: <@var="y1"> (serie)
<@var="y2"> (serie)
Computes the covariance between <@var="y1"> and <@var="y2">. Vedi anche <@ref="corr">, <@ref="mcov">, <@ref="mcorr">.
# critical probdist
Risultato: stesso tipo dell'argomento
Argomenti: <@var="c"> (carattere)
<@var="…"> (vedi sotto)
<@var="p"> (scalare, serie o matrice)
Esempi: <@lit="c1 = critical(t, 20, 0.025)">
<@lit="c2 = critical(F, 4, 48, 0.05)">
Critical value calculator. Returns <@itl="x"> such that <@itl="P(X > x) = p">, where the distribution <@itl="X"> is determined by the character <@var="c">. Between the arguments <@var="c"> and <@var="p">, zero or more additional arguments are required to specify the parameters of the distribution, as follows.
<indent>
• Standard normal (c = z, n, or N): no extra arguments
</indent>
<indent>
• Student's t (t): degrees of freedom
</indent>
<indent>
• Chi square (c, x, or X): degrees of freedom
</indent>
<indent>
• Snedecor's F (f or F): df (num.); df (den.)
</indent>
<indent>
• Binomial (b or B): probability; trials
</indent>
Vedi anche <@ref="cdf">, <@ref="invcdf">, <@ref="pvalue">.
# cum transforms
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (serie o matrice)
Cumulates <@var="x">. When <@var="x"> is a series, produces a series <@itl="y"> each of whose elements is the sum of the values of <@var="x"> to date; the starting point of the summation is the first non-missing observation in the currently selected sample. When <@var="x"> is a matrix, its elements are cumulated by columns.
Vedi anche <@ref="diff">.
# det linalg
Risultato: scalare
Argomento: <@var="A"> (matrice quadrata)
Returns the determinant of <@var="A">, computed via the LU factorization. Vedi anche <@ref="ldet">, <@ref="rcond">.
# diag linalg
Risultato: matrice
Argomento: <@var="X"> (matrice)
Returns the principal diagonal of <@var="X"> in a column vector. Note: if <@var="X"> is an <@itl="m">×<@itl="n"> marix, the number of elements of the output vector is min(<@itl="m">, <@itl="n">). Vedi anche <@ref="tr">.
# diff transforms
Risultato: stesso tipo dell'argomento
Argomento: <@var="y"> (serie, matrice o lista)
Computes first differences. If <@var="y"> is a series, or a list of series, starting values are set to <@lit="NA">. If <@var="y"> is a matrix, differencing is done by columns and starting values are set to 0.
Vedi anche <@ref="cum">, <@ref="ldiff">, <@ref="sdiff">.
# dnorm probdist
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Returns the density function for a standard normal. Vedi anche <@ref="cnorm">, <@ref="qnorm">.
# dsort transforms
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (serie o vettore)
Sorts <@var="x"> in descending order, skipping observations with missing values when <@var="x"> is a series. Vedi anche <@ref="sort">, <@ref="values">.
# eigengen linalg
Risultato: matrice
Argomenti: <@var="A"> (matrice quadrata)
<@var="&U"> (riferimento a matrice, o <@lit="null">)
Computes the eigenvalues, and optionally the right eigenvectors, of the <@itl="n">×<@itl="n"> matrix <@var="A">. If all the eigenvalues are real, an <@itl="n">×<@itl="1"> matrix is returned; otherwise, the result is an <@itl="n">×<@itl="2"> matrix, the first column holding the real components and the second column the imaginary components.
The second argument must be either the name of an existing matrix preceded by <@lit="&"> (to indicate the "address" of the matrix in question), in which case an auxiliary result is written to that matrix, or the keyword <@lit="null">, in which case the auxiliary result is not produced.
If a non-null second argument is given, the specified matrix will be over-written with the auxiliary result. (It is not required that the existing matrix be of the right dimensions to receive the result.) It will be organized as follows:
<indent>
• If the <@itl="i">-th eigenvalue is real, the <@itl="i">-th column of <@itl="U"> will contain the corresponding eigenvector;
</indent>
<indent>
• If the <@itl="i">-th eigenvalue is complex, the <@itl="i">-th column of <@var="U"> will contain the real part of the corresponding eigenvector and the next column the imaginary part. The eigenvector for the conjugate eigenvalue is the conjugate of the eigenvector.
</indent>
In other words, the eigenvectors are stored in the same order as the eigenvalues, but the real eigenvectors occupy one column, whereas complex eigenvectors take two (the real part comes first); the total number of columns is still <@itl="n">, because the conjugate eigenvector is skipped.
Vedi anche <@ref="eigensym">, <@ref="qrdecomp">, <@ref="svd">.
# eigensym linalg
Risultato: vettore colonna
Argomenti: <@var="A"> (matrice quadrata)
<@var="&U"> (riferimento a matrice, o <@lit="null">)
Computes the eigenvalues, and optionally the right eigenvectors, of the <@itl="n">×<@itl="n"> symmetrix matrix <@var="A">; the second argument must be either the name of an existing matrix preceded by <@lit="&"> (to indicate the "address" of the matrix in question), in which case an auxiliary result is written to that matrix, or the keyword <@lit="null">, in which case the auxiliary result is not produced.
If the second argument is not <@lit="null">, the specified matrix will be over-written with the auxiliary result. (It is not required that the existing matrix be of the right dimensions to receive the result.)
Vedi anche <@ref="eigengen">, <@ref="qrdecomp">, <@ref="svd">.
# exp math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Exponential. Note: in case of matrices, the function acts element by element. For the matrix exponential function, see <@ref="mexp">.
# fdjac numerical
Risultato: matrice
Argomenti: <@var="b"> (vettore colonna)
<@var="s"> (stringa)
Calculates the (forward-difference approximation to the) Jacobian associated with the vector <@var="b"> and the transformation function defined by the function call in the string <@var="s">. For more details and examples see the chapter on special functions in <@lit="genr"> in <@pdf="la guida all'uso di gretl">.
Vedi anche <@ref="BFGSmax">.
# fft linalg
Risultato: matrice
Argomento: <@var="X"> (matrice)
Discrete real Fourier transform. If the input matrix <@var="X"> has <@itl="n"> columns, the output has 2<@itl="n"> columns, where the real parts are stored in the odd columns and the complex parts in the even ones.
Should it be necessary to compute the Fourier transform on several vectors with the same number of elements, it is numerically more efficient to group them into a matrix rather than invoking <@lit="fft"> for each vector separately. Vedi anche <@ref="ffti">.
# ffti linalg
Risultato: matrice
Argomento: <@var="X"> (matrice)
Inverse discrete real Fourier transform. It is assumed that <@var="X"> contains <@itl="n"> complex column vectors, with the real part in the odd columns and the imaginary part in the even ones, so the total number of columns should be 2<@itl="n">. A matrix with <@itl="n"> columns is returned.
Should it be necessary to compute the inverse Fourier transform on several vectors with the same number of elements, it is numerically more efficient to group them into a matrix rather than invoking <@lit="ffti"> for each vector separately. Vedi anche <@ref="fft">.
# firstobs data-utils
Risultato: scalare
Argomento: <@var="y"> (serie)
First non-missing observation for the variable <@var="y">. Note that if some form of subsampling is in effect, the value returned may be smaller than the dollar variable <@ref="$t1">. Vedi anche <@ref="lastobs">.
# floor math
Risultato: stesso tipo dell'argomento
Argomento: <@var="y"> (scalare, serie o matrice)
Floor function: returns the greatest integer less than or equal to <@var="x">. Note: <@ref="int"> and <@lit="floor"> differ in their effect for negative arguments: <@lit="int(-3.5)"> gives –3, while <@lit="floor(-3.5)"> gives –4.
# fracdiff filters
Risultato: serie
Argomenti: <@var="y"> (serie)
<@var="d"> (scalare)
Returns the fractional difference of order <@var="d"> for the series <@var="y">.
Note that in theory fractional differentiation is an infinitely long filter. In practice, presample values of <@itl="y"><@sub="t"> are assumed to be zero.
# gammafun math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Returns the gamma function of <@var="x">.
# genpois probdist
Risultato: serie
Argomento: <@var="μ"> (scalare o serie)
Generates a series of Poisson pseudo-random variates. If μ is a scalar, all the elements are drawn from the same distribution; if μ is a series, the appropriate value μ<@sub="t"> is used at each observation.
Vedi anche <@ref="randgen">, <@ref="normal">, <@ref="uniform">, <@ref="mnormal">, <@ref="muniform">.
# gini stats
Risultato: scalare
Argomento: <@var="y"> (serie)
Returns Gini's inequality index for the series <@var="y">.
# ginv linalg
Risultato: matrice
Argomento: <@var="A"> (matrice)
Returns <@itl="A"><@sup="+">, the Moore–Penrose or generalized inverse of <@var="A">, computed via the singular value decomposition.
Vedi anche <@ref="inv">, <@ref="svd">.
# hpfilt filters
Risultato: serie
Argomento: <@var="y"> (serie)
Returns the cycle from the Hodrick–Prescott filter applied to series <@var="y">. See <@pdf="la guida all'uso di gretl"> for details. Vedi anche <@ref="bkfilt">.
# I matbuild
Risultato: matrice quadrata
Argomento: <@var="n"> (scalare)
Returns an identity matrix with <@var="n"> rows and columns.
# imaxc stats
Risultato: vettore riga
Argomento: <@var="X"> (matrice)
Returns a vector containing the row indices of the maxima of the columns of <@var="X">. Vedi anche <@ref="imaxr">, <@ref="iminc">, <@ref="maxc">.
# imaxr stats
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Returns a vector containing the column indices of the maxima of the rows of <@var="X">. Vedi anche <@ref="imaxc">, <@ref="iminr">, <@ref="maxr">.
# iminc stats
Risultato: vettore riga
Argomento: <@var="X"> (matrice)
Returns the row indices of the minima of the columns of <@itl="X">. Vedi anche <@ref="imaxc">, <@ref="iminr">, <@ref="minc">.
# iminr stats
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Returns the column indices of the maxima of the rows of <@itl="X">. Vedi anche <@ref="imaxr">, <@ref="iminc">, <@ref="minr">.
# infnorm linalg
Risultato: scalare
Argomento: <@var="X"> (matrice)
Returns the infinity-norm of <@var="X">, that is, the maximum across the rows of <@var="X"> of the sum of absolute values of the row elements.
Vedi anche <@ref="onenorm">.
# int math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Truncates the fractional part of <@var="x">. Note: <@lit="int"> and <@ref="floor"> differ in their effect for negative arguments: <@lit="int(-3.5)"> gives –3, while <@lit="floor(-3.5)"> gives –4. Vedi anche <@ref="ceil">.
# inv linalg
Risultato: matrice
Argomento: <@var="A"> (matrice quadrata)
Returns the inverse of <@var="A">. If <@var="A"> is singular or not square, an error message is produced and nothing is returned. Note that gretl checks automatically the structure of <@var="A"> and uses the most efficient numerical procedure to perform the inversion.
The matrix types gretl checks for are: identity; diagonal; symmetric and positive definite; symmetric but not positive definite; and triangular.
Vedi anche <@ref="ginv">, <@ref="invpd">.
# invcdf probdist
Risultato: stesso tipo dell'argomento
Argomenti: <@var="c"> (carattere)
<@var="…"> (vedi sotto)
<@var="p"> (scalare, serie o matrice)
Inverse cumulative distribution function calculator. Returns <@itl="x"> such that <@itl="P(X < x) = p">, where the distribution <@itl="X"> is determined by the character <@var="c">; Between the arguments <@var="c"> and <@var="p">, zero or more additional arguments are required to specify the parameters of the distribution, as follows.
<indent>
• Standard normal (c = z, n, or N): no extra arguments
</indent>
<indent>
• Student's t (t): degrees of freedom
</indent>
<indent>
• Chi square (c, x, or X): degrees of freedom
</indent>
<indent>
• Snedecor's F (f or F): df (num.); df (den.)
</indent>
<indent>
• Binomial (b or B): probability; trials
</indent>
Vedi anche <@ref="cdf">, <@ref="critical">, <@ref="pvalue">.
# invpd linalg
Risultato: matrice quadrata
Argomento: <@var="A"> (matrice simmetrica)
Returns the inverse of the symmetric, positive definite matrix <@var="A">. This function is slightly faster than <@ref="inv"> for large matrices, since no check for symmetry is performed; for that reason it should be used with care.
# islist data-utils
Risultato: scalare
Argomento: <@var="s"> (stringa)
Returns 1 if <@var="s"> is the identifier for a currently defined list. Mainly used for checking arguments passed to functions. Vedi anche <@ref="isnull">, <@ref="isseries">, <@ref="isstring">.
# isnull data-utils
Risultato: scalare
Argomento: <@var="s"> (stringa)
Returns 0 if <@var="s"> is the identifier for a currently defined object, be it a scalar, a series, a matrix or a list. Mainly used for checking arguments passed to functions. Vedi anche <@ref="islist">, <@ref="isseries">, <@ref="isstring">.
# isseries data-utils
Risultato: scalare
Argomento: <@var="s"> (stringa)
Returns 1 if <@var="s"> is the identifier for a currently defined series. Mainly used for checking arguments passed to functions. Vedi anche <@ref="islist">, <@ref="isnull">, <@ref="isstring">.
# isstring data-utils
Risultato: scalare
Argomento: <@var="s"> (stringa)
Returns 1 if <@itl="s"> is the identifier for a currently defined series. Mainly used for checking arguments passed to functions. Vedi anche <@ref="islist">, <@ref="isnull">, <@ref="isseries">.
# lags transforms
Risultato: lista
Argomenti: <@var="p"> (scalare)
<@var="y"> (serie o lista)
Generates lags 1 to <@var="p"> of the series <@var="y">, or if <@var="y"> is a list, of all variables in the list. If <@var="p"> = 0, the maximum lag defaults to the periodicity of the data; otherwise <@var="p"> must be positive.
# lastobs data-utils
Risultato: scalare
Argomento: <@var="y"> (serie)
Last non-missing observation for the variable <@var="y">. Note that if some form of subsampling is in effect, the value returned may be larger than the dollar variable <@ref="$t2">. Vedi anche <@ref="firstobs">.
# ldet linalg
Risultato: scalare
Argomento: <@var="A"> (matrice quadrata)
Returns the natural log of the determinant of <@itl="A">, computed via the LU factorization. Vedi anche <@ref="det">, <@ref="rcond">.
# ldiff transforms
Risultato: stesso tipo dell'argomento
Argomento: <@var="y"> (serie o lista)
Computes log differences; starting values are set to <@lit="NA">.
# log math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie, matrice o lista)
Natural logarithm; produces <@lit="NA"> for non-positive values. Note: <@lit="ln"> is an acceptable alias for <@lit="log">.
# lngamma math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Log of the gamma function of <@var="x">.
# log10 math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Base-10 logarithm; produces <@lit="NA"> for non-positive values.
# log2 math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Base-2 logarithm; produces <@lit="NA"> for non-positive values.
# lower matshape
Risultato: matrice quadrata
Argomento: <@var="A"> (matrice)
Returns an <@itl="n">×<@itl="n"> lower triangular matrix: the elements on and below the diagonal are equal to the corresponding elements of <@var="A">; the remaining elements are zero.
Vedi anche <@ref="upper">.
# lrvar filters
Risultato: scalare
Argomenti: <@var="y"> (serie)
<@var="k"> (scalare)
Returns the long-run variance of <@var="y">, calculated using a Bartlett kernel with window size <@var="k">.
# makemask data-utils
Risultato: vettore colonna
Argomento: <@var="y"> (serie)
Produces a column vector containing the observation numbers corresponding to the non-zero entries in the series <@var="y">. This function is typically useful for filtering out rows of a matrix built from data series.
# max stats
Risultato: scalare o serie
Argomento: <@var="y"> (serie)
The maximum of the non-missing observations in series <@var="y">.
# maxc stats
Risultato: vettore riga
Argomento: <@var="X"> (matrice)
Returns the maxima of the columns of <@var="X">. Vedi anche <@ref="imaxc">, <@ref="maxr">, <@ref="minc">.
# maxr stats
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Returns the maxima of the rows of <@var="X">. Vedi anche <@ref="imaxr">, <@ref="maxc">, <@ref="minr">.
# mcorr stats
Risultato: matrice
Argomento: <@var="X"> (matrice)
Computes a correlation matrix treating each column of <@var="X"> as a variable. Vedi anche <@ref="corr">, <@ref="cov">, <@ref="mcov">.
# mcov stats
Risultato: matrice
Argomento: <@var="X"> (matrice)
Computes a covariance matrix treating each column of <@var="X"> as a variable. Vedi anche <@ref="corr">, <@ref="cov">, <@ref="mcorr">.
# mean stats
Risultato: scalare o serie
Argomento: <@var="y"> (serie)
The sample mean of the non-missing observations in series <@var="y">.
# meanc stats
Risultato: vettore riga
Argomento: <@var="X"> (matrice)
Returns the means of the columns of <@var="X">. Vedi anche <@ref="meanr">, <@ref="sumc">.
# meanr stats
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Returns the means of the rows of <@var="X">. Vedi anche <@ref="meanc">, <@ref="sumr">.
# median stats
Risultato: scalare
Argomento: <@var="y"> (serie)
The median of the non-missing observations in series <@var="y">. Vedi anche <@ref="quantile">.
# mexp linalg
Risultato: matrice quadrata
Argomento: <@var="A"> (matrice quadrata)
Computes the matrix exponential of <@var="A">, using algorithm 11.3.1 from Golub and Van Loan (1996).
# min stats
Risultato: scalare o serie
Argomento: <@var="y"> (serie)
The minimum of the non-missing observations in series <@var="y">.
# minc stats
Risultato: vettore riga
Argomento: <@var="X"> (matrice)
Returns the minima of the columns of <@var="X">. Vedi anche <@ref="iminc">, <@ref="maxc">, <@ref="minr">.
# minr stats
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Returns the minima of the rows of <@var="X">. Vedi anche <@ref="iminr">, <@ref="maxr">, <@ref="minc">.
# missing data-utils
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare o serie)
Returns a binary variable holding 1 if <@var="x"> is <@lit="NA">. If <@var="x"> is a series, the comparison is done element by element. Vedi anche <@ref="misszero">, <@ref="ok">, <@ref="zeromiss">.
# misszero data-utils
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare o serie)
Converts <@lit="NA">s to zeros. If <@var="x"> is a series, the conversion is done element by element. Vedi anche <@ref="missing">, <@ref="ok">, <@ref="zeromiss">.
# mlag transforms
Risultato: matrice
Argomenti: <@var="X"> (matrice)
<@var="p"> (scalare)
For <@var="p"> > 0, returns a matrix in which the columns of <@var="X"> are shifted down by <@var="p"> rows and the first <@var="p"> rows are filled with zeros. If <@var="p"> is a negative number, <@var="X"> is shifted up and the last rows are filled with zeros.
# mnormal probdist
Risultato: matrice
Argomenti: <@var="r"> (scalare)
<@var="c"> (scalare)
Returns a matrix with <@var="r"> rows and <@var="c"> columns, filled with standard normal pseudo-random variates. Vedi anche <@ref="normal">, <@ref="muniform">.
# mols stats
Risultato: matrice
Argomenti: <@var="Y"> (matrice)
<@var="X"> (matrice)
<@var="&U"> (riferimento a matrice, o <@lit="null">)
Returns the OLS estimates obtained by regressing the <@itl="T">×<@itl="n"> matrix <@var="Y"> on the <@itl="T">×<@itl="k"> matrix <@var="X">. The Cholesky decomposition is used. If the third argument is not <@lit="null">, the matrix <@var="U"> will contain the residuals.
# movavg filters
Risultato: serie
Argomenti: <@var="x"> (serie)
<@var="p"> (scalare)
Calcola la media mobile a <@var="p"> termini per la serie <@var="x">, vale a dire la media delle osservazioni da x(t) a x(t-p+1).
Il risultato è una media mobile non centrata. Se si desidera una media mobile centrata, si può usare l'operatore anticipo sulla serie risultato. Ad esempio::
<code>
tmp = movavg(x,3)
y = tmp(+1)
</code>
# mread matbuild
Risultato: matrice
Argomento: <@var="s"> (stringa)
Reads a matrix from a text file. The string <@var="s"> must contain the name of the (plain text) file from which the matrix is to be read. The file in question must conform to the following rules:
<indent>
• The columns must be separated by spaces or tab characters.
</indent>
<indent>
• The decimal separator must be the dot character, "<@lit=".">".
</indent>
<indent>
• The first line in the file must contain two integers, separated by a space or a tab, indicating the number of rows and columns, respectively.
</indent>
Should an error occur (such as the file being badly formatted or inaccessible), an empty matrix is returned.
Vedi anche <@ref="mwrite">.
# mshape matshape
Risultato: matrice
Argomenti: <@var="X"> (matrice)
<@var="r"> (scalare)
<@var="c"> (scalare)
Rearranges the elements of <@var="X"> into a matrix with <@var="r"> rows and <@var="c"> columns. Elements are read from <@var="X"> and written to the target in column-major order. If <@var="X"> contains fewer than <@itl="k"> = <@itl="rc"> elements, the elements are repeated cyclically; otherwise, if <@var="X"> has more elements, only the first <@itl="k"> are used.
Vedi anche <@ref="cols">, <@ref="rows">, <@ref="unvech">, <@ref="vec">, <@ref="vech">.
# muniform matbuild
Risultato: matrice
Argomenti: <@var="r"> (scalare)
<@var="c"> (scalare)
Returns a matrix with <@var="r"> rows and <@var="c"> columns, filled with uniform (0,1) pseudo-random variates. Note: the preferred method for generating a scalar uniform r.v. is recasting the output of <@lit="muniform"> to a scalar, as in
<code>
scalar x = muniform(1,1)
</code>
Vedi anche <@ref="mnormal">, <@ref="uniform">.
# mwrite matbuild
Risultato: scalare
Argomenti: <@var="X"> (matrice)
<@var="s"> (stringa)
Writes the matrix <@var="X"> to a plain text file named <@var="s">. The file will contain on the first line two integers, separated by a tab character, with the number of rows and columns; on the next lines, the matrix elements in scientific notation, separated by tabs (one line per row).
If file <@var="s"> already exists, it will be overwritten. The return value is 0 on successful completion; if an error occurs, such as the file being unwritable, the return value will be non-zero.
Matrices stored via the <@lit="mwrite"> command can be easily read by other programs; see <@pdf="la guida all'uso di gretl"> for details.
Vedi anche <@ref="mread">.
# mxtab stats
Risultato: matrice
Argomenti: <@var="x"> (serie o vettore)
<@var="y"> (serie o vettore)
Returns a matrix holding the cross tabulation of the values contained in <@var="x"> (by row) and <@var="y"> (by column). The two arguments should be of the same type (both series or both column vectors), and because of the typical usage of this function, are assumed to contain integer values only.
Vedi anche <@ref="values">.
# nelem data-utils
Risultato: scalare
Argomento: <@var="L"> (lista)
Returns the number of items in list <@var="L">.
# nobs stats
Risultato: scalare
Argomento: <@var="y"> (serie)
Returns the number of non-missing observations for the variable <@var="y"> in the currently selected sample.
# normal probdist
Risultato: serie
Argomenti: <@var="μ"> (scalare)
<@var="σ"> (scalare)
Generates a series of Gaussian pseudo-random variates with mean μ and standard deviation σ. If no arguments are supplied, standard normal variates <@itl="N">(0,1) are produced.
Vedi anche <@ref="randgen">, <@ref="normal">, <@ref="genpois">, <@ref="mnormal">, <@ref="muniform">.
# nullspace linalg
Risultato: matrice
Argomento: <@var="A"> (matrice)
Computes the right nullspace of <@var="A">, via the singular value decomposition: the result is a matrix <@itl="B"> such that the product <@itl="AB"> is a zero matrix, except when <@var="A"> has full column rank, in which case an empty matrix is returned. Otherwise, if <@var="A"> is <@itl="m">×<@itl="n">, <@itl="B"> will be <@itl="n"> by (<@itl="n"> – <@itl="r">), where <@itl="r"> is the rank of <@var="A">.
Vedi anche <@ref="rank">, <@ref="svd">.
# obs data-utils
Risultato: serie
Returns a series of consecutive integers, setting 1 at the start of the dataset. Note that the result is invariant to subsampling. This function is especially useful with time-series datasets. Note: you can write <@lit="t"> instead of <@lit="obs"> with the same effect.
Vedi anche <@ref="obsnum">.
# obsnum data-utils
Risultato: scalare
Argomento: <@var="s"> (stringa)
Returns an integer corresponding to the observation specified by the string <@itl="s">. Note that the result is invariant to subsampling. This function is especially useful with time-series datasets. For example, the following code
<code>
open denmark
k = obsnum(1980:1)
</code>
yields <@lit="k = 25">, indicating that the first quarter of 1980 is the 25th observation in the <@lit="denmark"> dataset.
Vedi anche <@ref="obs">.
# ok data-utils
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o lista)
Returns a binary variable holding 1 if <@itl="x"> is not <@lit="NA">. If <@itl="x"> is a series, the comparison is done element by element. If <@itl="x"> is a list of series, the output is a series with 0 at the observations for which at least one series in the list is missing, and 1 otherwise.
Vedi anche <@ref="missing">, <@ref="misszero">, <@ref="zeromiss">.
# onenorm linalg
Risultato: scalare
Argomento: <@var="X"> (matrice)
Returns the 1-norm of the matrix <@var="X">, that is, the maximum across the columns of <@var="X"> of the sum of absolute values of the column elements.
Vedi anche <@ref="infnorm">, <@ref="rcond">.
# ones matbuild
Risultato: matrice
Argomenti: <@var="r"> (scalare)
<@var="c"> (scalare)
Outputs a matrix with <@itl="r"> rows and <@itl="c"> columns, filled with ones.
Vedi anche <@ref="seq">, <@ref="zeros">.
# orthdev transforms
Risultato: serie
Argomento: <@var="y"> (serie)
Only applicable if the currently open dataset has a panel structure. Computes the forward orthogonal deviations for variable <@var="y">.
This transformation is sometimes used instead of differencing to remove individual effects from panel data. Vedi anche <@ref="diff">.
# pmean stats
Risultato: serie
Argomento: <@var="y"> (serie)
Only applicable if the currently open dataset has a panel structure. Computes the per-unit mean for variable <@var="y">; that is, the sum of the valid observations for each unit divided by the number of valid observations for each unit.
Missing values are skipped. Vedi anche <@ref="psd">.
# princomp stats
Risultato: matrice
Argomenti: <@var="X"> (matrice)
<@var="p"> (scalare)
Let the matrix <@var="X"> be <@itl="T">×<@itl="k">, containing <@itl="T"> observations on <@itl="k"> variables. The argument <@var="p"> must be a positive integer less than or equal to <@itl="k">. This function returns a <@itl="T">×<@itl="p"> matrix, <@itl="P">, holding the first <@itl="p"> principal components of <@var="X">.
The elements of <@itl="P"> are computed as the sum from <@itl="i"> to <@itl="k"> of <@itl="Z"><@sub="ti"> times <@itl="v"><@sub="ji">, where <@itl="Z"><@sub="ti"> is the standardized value of variable <@itl="i"> at observation <@itl="t"> and <@itl="v"><@sub="ji"> is the <@itl="j">th eigenvector of the correlation matrix of the <@itl="X"><@sub="i">s, with the eigenvectors ordered by decreasing value of the corresponding eigenvalues.
Vedi anche <@ref="eigensym">.
# psd stats
Risultato: serie
Argomento: <@var="y"> (serie)
Only applicable if the currently open dataset has a panel structure. Computes the per-unit sample standard deviation for variable <@itl="y">. The denominator used is the sample size for each unit minus 1, unless the number of valid observations for the given unit is 1 (in which case 0 is returned) or 9 (in which case <@lit="NA"> is returned).
Note: this function makes it possible to check whether a given variable (say, <@lit="X">) is time-invariant via the condition <@lit="max(psd(X)) = 0">.
Vedi anche <@ref="pmean">.
# pvalue probdist
Risultato: stesso tipo dell'argomento
Argomenti: <@var="c"> (carattere)
<@var="…"> (vedi sotto)
<@var="x"> (scalare, serie o matrice)
Esempi: <@lit="p1 = pvalue(z, 2.2)">
<@lit="p2 = pvalue(X, 3, 5.67)">
<@lit="p2 = pvalue(F, 3, 30, 5.67)">
<@itl="P">-value calculator. Returns <@itl="P(X > x)">, where the distribution <@itl="X"> is determined by the character <@var="c">. Between the arguments <@var="c"> and <@var="x">, zero or more additional arguments are required to specify the parameters of the distribution; see <@ref="cdf"> for details. The distributions supported by the <@lit="pval"> function are the standard normal, <@itl="t">, Chi square, <@itl="F">, gamma, binomial and Poisson.
Vedi anche <@ref="critical">, <@ref="invcdf">.
# qform linalg
Risultato: matrice
Argomenti: <@var="x"> (matrice)
<@var="A"> (matrice simmetrica)
Computes the quadratic form <@itl="Y = xAx'">. Using this function instead of ordinary matrix multiplication guarantees more speed and better accuracy. If <@var="x"> and <@var="A"> are not conformable, or <@var="A"> is not symmetric, an error is returned.
# qnorm probdist
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Returns quantiles for the standard normal distribution. If <@var="x"> is not between 0 and 1, <@lit="NA"> is returned. Vedi anche <@ref="cnorm">, <@ref="dnorm">.
# qrdecomp linalg
Risultato: matrice
Argomenti: <@var="X"> (matrice)
<@var="&R"> (riferimento a matrice, o <@lit="null">)
Computes the QR decomposition of an <@itl="m">×<@itl="n"> matrix <@var="X">, that is <@itl="X = QR"> where <@itl="Q"> is an <@itl="m">×<@itl="n"> orthogonal matrix and <@itl="R"> is an <@itl="n">×<@itl="n"> upper triangular matrix. The matrix <@itl="Q"> is returned directly, while <@itl="R"> can be retrieved via the optional second argument.
Vedi anche <@ref="eigengen">, <@ref="eigensym">, <@ref="svd">.
# quantile stats
Risultato: scalare o vettore riga
Argomenti: <@var="y"> (serie o matrice)
<@var="p"> (scalare tra 0 e 1)
Given a series argument, returns the <@var="p">-quantile for the series. For example, when <@itl="p"> = 0.5, the median is returned. Given a matrix argument, returns a row vector containing the <@var="p">-quantiles for the columns of <@var="y">; that is, each column is treated as a series.
# rank linalg
Risultato: scalare
Argomento: <@var="X"> (matrice)
Returns the rank of <@var="X">, numerically computed via the singular value decomposition. Vedi anche <@ref="svd">.
# ranking stats
Risultato: serie
Argomento: <@var="y"> (serie)
Returns a series with the ranks of <@itl="y">. The rank for observation <@itl="i"> is the number of elements in the series that are less than <@itl="y"><@sub="i"> plus one half the number of elements in the series that are equal to <@itl="y"><@sub="i">. (Intuitively, you may think of chess points, where victory gives you one point and a draw gives you half a point.) One is added so the lowest rank is 1 instead of 0.
Vedi anche <@ref="sort">, <@ref="sortby">.
# randgen probdist
Risultato: serie
Argomenti: <@var="c"> (carattere)
<@var="a"> (scalare)
<@var="b"> (scalare)
Esempi: <@lit="series x = randgen(u, 0, 100)">
<@lit="series t14 = randgen(t, 14)">
<@lit="series y = randgen(B, 0.6, 30)">
<@lit="series g = randgen(G, 1, 1)">
All-purpose random number generator. The parameter <@var="c"> is a character, which specifies from which distribution the pseudo-random numbers should be drawn; <@var="a"> and, in some cases, <@var="b"> gauge the shape of the distribution.
<indent>
• Uniform (continuous) (c = u or U): minimum; maximum
</indent>
<indent>
• Standard normal (c = z, n, or N): mean; standard deviation
</indent>
<indent>
• Student's t (t): degrees of freedom
</indent>
<indent>
• Chi square (c, x, or X): degrees of freedom
</indent>
<indent>
• Snedecor's F (f or F): df (num.); df (den.)
</indent>
<indent>
• Gamma (g or G): shape; scale
</indent>
<indent>
• Binomial (b or B): probability; number of trials
</indent>
<indent>
• Poisson (p or P): Mean
</indent>
Vedi anche <@ref="normal">, <@ref="uniform">, <@ref="genpois">.
# rcond linalg
Risultato: scalare
Argomento: <@var="A"> (matrice simmetrica)
Returns the reciprocal condition number for <@var="A">, which must be symmetric and positive definite, with respect to the 1-norm. In many circumstances, this is a better measure of the sensitivity of <@var="A"> to numerical operations such as inversion than the determinant.
The value is computed as the reciprocal of the product, 1-norm of <@var="A"> times 1-norm of <@var="A">-inverse.
Vedi anche <@ref="det">, <@ref="ldet">, <@ref="onenorm">.
# resample stats
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (serie o matrice)
Resamples from <@var="x"> with replacement. In the case of a series argument, each value of the returned series, <@itl="y"><@sub="t">, is drawn from among all the values of <@itl="x"><@sub="t"> with equal probability. When a matrix argument is given, each row of the returned matrix is drawn from the rows of <@var="x"> with equal probability.
# round math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Rounds to the nearest integer. Note that when <@itl="x"> lies halfway between two integers, rounding is done "away from zero", so for example 2.5 rounds to 3, but <@lit="round(-3.5)"> gives –4. This is a common convention in spreadsheet programs, but other software may yield different results. Vedi anche <@ref="ceil">, <@ref="floor">, <@ref="int">.
# rows matshape
Risultato: scalare
Argomento: <@var="X"> (matrice)
Number of rows of the matrix <@var="X">. Vedi anche <@ref="cols">, <@ref="mshape">, <@ref="unvech">, <@ref="vec">, <@ref="vech">.
# sd stats
Risultato: scalare o serie
Argomento: <@var="y"> (serie)
Sample standard deviation of the non-missing observations in series <@var="y">. Vedi anche <@ref="var">.
# sdiff transforms
Risultato: stesso tipo dell'argomento
Argomento: <@var="y"> (serie o lista)
Computes seasonal differences: <@itl="y(t) - y(t-k)">, where <@itl="k"> is the periodicity of the current dataset (see <@ref="$pd">). Starting values are set to <@lit="NA">.
# selifc matshape
Risultato: matrice
Argomenti: <@var="A"> (matrice)
<@var="b"> (vettore riga)
Selects from <@var="A"> only the columns for which the corresponding element of <@var="b"> is non-zero. <@var="b"> must be a row vector with the same number of columns as <@var="A">.
Vedi anche <@ref="selifr">.
# selifr matshape
Risultato: matrice
Argomenti: <@var="A"> (matrice)
<@var="b"> (vettore colonna)
Selects from <@var="A"> only the rows for which the corresponding element of <@var="b"> is non-zero. <@var="b"> must be a column vector with the same number of rows as <@var="A">.
Vedi anche <@ref="selifc">.
# seq matbuild
Risultato: vettore riga
Argomenti: <@var="a"> (scalare)
<@var="b"> (scalare)
Returns a row vector filled with consecutive integers, with <@var="a"> as first element and <@var="b"> last. If <@var="a"> is greater than <@var="b"> the sequence will be decreasing. If either argument is not integral its fractional part is discarded.
Vedi anche <@ref="ones">, <@ref="zeros">.
# sin math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Sine. Vedi anche <@ref="cos">, <@ref="tan">, <@ref="atan">.
# sort stats
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (serie o vettore)
Sorts <@var="x"> in ascending order, skipping observations with missing values when <@itl="x"> is a series. Vedi anche <@ref="dsort">, <@ref="values">.
# sortby stats
Risultato: serie
Argomenti: <@var="y1"> (serie)
<@var="y2"> (serie)
Returns a series containing the elements of <@var="y2"> sorted by increasing value of the first argument, <@var="y1">. Vedi anche <@ref="sort">, <@ref="ranking">.
# sqrt math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Square root of <@var="x">; produces <@lit="NA"> for negative values.
# sst stats
Risultato: scalare
Argomento: <@var="y"> (serie)
Sum of squared deviations from the mean for the non-missing observations in series <@var="y">. Vedi anche <@ref="var">.
# sum stats
Risultato: scalare
Argomento: <@var="y"> (serie)
Sum of the non-missing observations in series <@var="y">.
# sumc stats
Risultato: vettore riga
Argomento: <@var="X"> (matrice)
Returns the sums of the columns of <@var="X">. Vedi anche <@ref="meanc">, <@ref="sumr">.
# sumr stats
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Returns the sums of the rows of <@var="X">. Vedi anche <@ref="meanr">, <@ref="sumc">.
# svd linalg
Risultato: vettore riga
Argomenti: <@var="X"> (matrice)
<@var="&U"> (riferimento a matrice, o <@lit="null">)
<@var="&V"> (riferimento a matrice, o <@lit="null">)
Performs the singular values decomposition of the matrix <@var="X">.
The singular values are returned in a row vector. The left and/or right singular vectors <@itl="U"> and <@itl="V"> may be obtained by supplying non-null values for arguments 2 and 3, respectively. For any matrix <@lit="A">, the code
<code>
s = svd(A, &U, &V)
B = (U .* s) * V
</code>
should yield <@lit="B"> identical to <@lit="A"> (apart from machine precision).
Vedi anche <@ref="eigengen">, <@ref="eigensym">, <@ref="qrdecomp">.
# tan math
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare, serie o matrice)
Tangent.
# tr linalg
Risultato: scalare
Argomento: <@var="A"> (matrice quadrata)
Returns the trace of the square matrix <@var="A">, namely <@itl="the sum of its diagonal elements">. Vedi anche <@ref="diag">.
# transp linalg
Risultato: matrice
Argomento: <@var="X"> (matrice)
Matrix transposition. Note: this is rarely used; in order to get the trasnpose of a matrix, in most cases you can just use the prime operator: <@lit="X'">.
# uniform probdist
Risultato: serie
Argomenti: <@var="a"> (scalare)
<@var="b"> (scalare)
Generates a series of uniform pseudo-random variates in the interval (<@var="a">, <@var="b">), or, if no arguments are supplied, in the interval (0,1). The algorithm used is the Mersenne Twister by Matsumoto and Nishimura (1998).
Vedi anche <@ref="randgen">, <@ref="normal">, <@ref="genpois">, <@ref="mnormal">, <@ref="muniform">.
# unvech linalg
Risultato: matrice quadrata
Argomenti: <@var="v"> (vettore)
<@var="b"> (scalare)
Returns an <@itl="n">×<@itl="n"> symmetric matrix obtained by rearranging the elements of <@itl="v">. The number of elements in <@itl="v"> must be a triangular integer — i.e., a number <@itl="k"> such that an integer <@itl="n"> exists with the property <@itl="k = n(n+1)/2">. This is the inverse of the function <@ref="vech">.
Vedi anche <@ref="mshape">.
# upper matshape
Risultato: matrice quadrata
Argomento: <@var="A"> (matrice quadrata)
Returns an <@itl="n">×<@itl="n"> upper triangular matrix: the elements on and above the diagonal are equal to the corresponding elements of <@var="A">; the remaining elements are zero.
Vedi anche <@ref="lower">.
# values stats
Risultato: vettore colonna
Argomento: <@var="x"> (serie o vettore)
Returns a vector containing the distinct elements of <@var="x"> sorted in ascending order. Note: because of its typical usage, <@var="x"> is assumed to contain integer values only. If not, the fractional part is truncated, so <@lit="values(x)"> is always identical to <@lit="values(int(x))">.
Vedi anche <@ref="dsort">, <@ref="sort">.
# var stats
Risultato: scalare o serie
Argomento: <@var="y"> (serie)
Sample variance of the non-missing observations in <@itl="y">; the sum of squared deviations from the mean is divided by (<@itl="n"> – 1) for <@itl="n"> > 1. If <@itl="n"> = 1, zero is returned; if <@itl="n"> = 0, <@lit="NA"> is returned.
Vedi anche <@ref="sd">.
# vec linalg
Risultato: vettore colonna
Argomento: <@var="X"> (matrice)
Stacks the columns of <@var="X"> as a column vector. Vedi anche <@ref="mshape">, <@ref="unvech">, <@ref="vech">.
# vech linalg
Risultato: vettore colonna
Argomento: <@var="A"> (matrice quadrata)
Returns in a column vector the elements of <@var="A"> on and above the diagonal. Typically, this function is used on symmetric matrices; in this case, it can be undone by the function <@ref="unvech">. Vedi anche <@ref="vec">.
# zeromiss data-utils
Risultato: stesso tipo dell'argomento
Argomento: <@var="x"> (scalare o serie)
Converts zeros to <@lit="NA">s. If <@var="x"> is a series, the conversion is done element by element. Vedi anche <@ref="missing">, <@ref="misszero">, <@ref="ok">.
# zeros matbuild
Risultato: matrice
Argomenti: <@var="r"> (scalare)
<@var="c"> (scalare)
Outputs a zero matrix with <@itl="r"> rows and <@itl="c"> columns. Vedi anche <@ref="ones">, <@ref="seq">.
|