The code below create a graph of Mean vs Desviation Standard, I am trying to put a Regression Line like a Fit Line in the resultant graph, but I cann't.
I was wondering if you could help me with this code.
Thank you so much.
Code: Select all
sample ss
scalar n = 99
scalar s = 12
genr x = clients
genr media = 0
genr dt = 0
for !i=1 to n
if !i * s > n then exitloop endif
%1 = @otod( !i * s - s + 1 )
%2 = @otod( !i * s )
smpl %1 %2
media(!i) = @mean( x )
dt(!i) = @sqrt( @var( x ) )
next
smpl @all if dt > 0
scat media dt
smpl ss
delete dt media n s x ss