Em 7 de dezembro de 2010 Henrique Andrade <henrique.coelho@gmail.com> escreveu:

Em 7 de dezembro de 2010 Sven Schreiber <svetosch@gmx.net> escreveu:

Am 07.12.2010 05:26, schrieb Henrique Andrade:

>
> I'd attached my current data set. If I could fill all the missing values
> with
> some number (e.g. 9999) I would solve my problem using the command:
>
> matrix A = { dataset }
>
> Is there a way to fill the missing observations with some arbitrary number
> using Gretl scripting?
>

maybe something like:

mynumber = 9999
matrix newA = misszero(A) + missing(A)*mynumber

Dear Sven, I'm trying to follow your suggestion but it doesn't work. Please
take a look at my script:

<script>
matrix A = { dataset }
scalar mynumber = 9999

matrix newA = misszero(A) + missing(A)*mynumber
</script>

Dear Sven and Allin, I'd found a solution for my problem. Please take a look at the
following script:

<script>
scalar mynumber = 9999

list variables = 1
loop i=2..144
    variables += $i
endloop

loop foreach i variables
    series $i = misszero($i) + missing($i)*mynumber
endloop

matrix A = { dataset }
</script>

Thanks for your help!

Best regards,
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge