/usr/share/gretl/scripts/ps2-2.inp is in gretl-common 1.9.14-2.
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 | # PS2.2 -- on means, s.d., c.v., Section 2.2
open data2-2
summary colgpa
# learn about the summary command
help summary
# verify summary statistics by computing them separately
genr xbar=mean(colgpa)
# s.d. of colgpa
genr sdx=sd(colgpa)
# variance of colgpa
genr varx = sdx*sdx
# coefficient of variation
genr cv = sdx/xbar
# list the variables
list
# reset sample range
smpl 1 1
# print variables
print xbar varx sdx cv
|