When variance of error is an function of a predictor, in general the variance function needs to be estimated along with mean equation. The FGLS is needed. Here is an example how it can be done in SAS and contrast it with ML.
For more information about FGLS please follow the link below
http://en.wikipedia.org/wiki/Feasible_Generalized_Least_Squares#Feasible_generalized_least_squares
data t1;
do i = 1 to 500;
x=rannor(123);
mean=1+2*x;
y=mean+2*abs(x)**0.3*rannor(123);
output;
end;
run;
proc model data=t1;
parms a=0 b=0 m=1 n=0.1;
y=a+b*x;
h.y = (m*abs(x)**n)**2;
fit y/ols fiml ;
run;
quit;