Hi,
since hansl is a very userfriendly language u can even shorten the code
by using
my_std_matrix ~= {my_std_series}
Cheers
Am 16.04.2013 15:30, schrieb artur bala:
>
>> (3) Finally, I would like to standardize the regressors (not the dependent
variable) in my dataset, such that each regressor has mean 0 and standard deviation of 1.
Is there a "summary way" to do this e.g. by declaring the dataset to be a
matrix, then operating on this matrix using some matrix operators?
> I guess you could do this by using the "meanc" and "sdc"
commands.
Or, better try the following script
<hansl>
open australia.gdt
matrix my_std_matrix = {}
loop foreach i PAU..IUS
mymean = mean($i)
mysd = sd($i)
my_std_series = ($i - mymean)/mysd
my_std_matrix = my_std_matrix ~ {my_std_series}
endloop
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users