Antonio,
Instead of:
missmap(k1,csvar=k1[,3],tsvar=k1[,2])
See if:
missmap(k1,csvar=3,tsvar=2)
works in your
dataset. That is, the arguments are the column positions, not
the actual extracted columns from the matrix. Or if this were a data frame you
could use variable names, such as:
missmap(k1,csvar="countryname",tsvar="year")
if those names were
appropriate (that is, contained in "names(k1)")
Hope all is well with you,
James
On Sun, Nov 14, 2010 08:49 AM "Antonio P. Ramos"
<ramos.grad.student(a)gmail.com>
wrote:
>
>Hi all,
>
>Basically I'm getting an error message that I don't really understand. It
>says that the subscript out of bounds but I can't see how.
>
>Thank you for your help,
>
>Best,
>
>Antonio.
>
>
>> # missing date matrix
>>
>> k1 <-cbind(data1$INFMORT,data1$YEAR,data1$COUNTRY)
>> k1 <-as.matrix(k1)
>> k1 <-as.matrix(k1)
>> str(k1)
> num [1:4126, 1:3] 160 NA NA NA NA ...
>> dim(k1)
>[1] 4126 3
>> head(k1)
> [,1] [,2] [,3]
>[1,] 160 1962 1
>[2,] NA 1963 1
>[3,] NA 1964 1
>[4,] NA 1965 1
>[5,] NA 1966 1
>[6,] 150 1967 1
>> quartz()
>
missmap(k1,csvar=k1[,3],tsvar=k1[,2])
>Error
in missmap(k1, csvar = k1[, 3], tsvar = k1[, 2]) :
> subscript out of bounds
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia
More info about Amelia:
http://gking.harvard.edu/amelia