"fzero" in Eviews?
Posted: Tue Jan 17, 2012 9:30 am
Hi,
Does Eviews have a solver similar to Matlab's "fzero" (*) function?
Background:
I have a vector of normally distributed 0/1 variables, and I would like to transform them such that they match a particular mean. More precisely, suppose I have 100 random draws, but I want to set all draws < 0.2 to 0.2, but preserve the mean. So I'd like to find an alpha such that
1/no_of_obs * (x1^alpha + x2^alpha + x3^alpha....) = 0.2
In Matlab I could use fzero to find that alpha. I don't think Eviews has anything comparable, but I might be mistaken (I hope I'm mistaken).... :-)
Many thanks,
Philipp
(*) From the Matlab help: Fzero -- Find root of continuous function of one variable, syntax:
x = fzero(fun,x0)
Description: x = fzero(fun,x0) tries to find a zero of fun near x0, if x0 is a scalar. fun is a function handle.
Does Eviews have a solver similar to Matlab's "fzero" (*) function?
Background:
I have a vector of normally distributed 0/1 variables, and I would like to transform them such that they match a particular mean. More precisely, suppose I have 100 random draws, but I want to set all draws < 0.2 to 0.2, but preserve the mean. So I'd like to find an alpha such that
1/no_of_obs * (x1^alpha + x2^alpha + x3^alpha....) = 0.2
In Matlab I could use fzero to find that alpha. I don't think Eviews has anything comparable, but I might be mistaken (I hope I'm mistaken).... :-)
Many thanks,
Philipp
(*) From the Matlab help: Fzero -- Find root of continuous function of one variable, syntax:
x = fzero(fun,x0)
Description: x = fzero(fun,x0) tries to find a zero of fun near x0, if x0 is a scalar. fun is a function handle.