Thanks for your reply. I got it now.

I was just wondering about some of the common "problems" with these maps: often in time-serious cross-sectional data we have so many counties that we can't really plot all their names; and if we wanna arrange country in terms of, say, income per capita income, to see the correlation of missing data and this indicator, than is even more difficult. I saw that you did some tricks in this post,like plotting over country names over both sides of the y-axis  but I can't see the code. Perhaps you and others might wanna share  some of this tricks.

http://www.iq.harvard.edu/blog/sss/archives/2009/02/missingness_map.shtml


Congratulation for your software!

Best,

Antonio.




On Mon, Nov 15, 2010 at 6:29 AM, Matt Blackwell <blackwel@fas.harvard.edu> wrote:
Hi Antonio,

Unfortunately, you need to include the time and cross-sectional
variables in the data passed to missmap and they will be mapped along
with any other variables. The missmap function relies on the image()
function at its core, so you could try to look at the source and hack
together a map that suits your needs.

If you want to draw the map without any time/cross-section
information, you can force R to treat the column as a one-column
matrix:

missmap(k1[ ,1, drop = FALSE])

Hope that helps,
matt.

On Mon, Nov 15, 2010 at 5:39 AM, Antonio P. Ramos
<ramos.grad.student@gmail.com> wrote:
> Hey James! How are you? Such a long time. We miss you!
>
> Thank for your reply: basically using your tip everything run but the map is
> kind of weird: I think it is plotting the 3 variables of the my date set,
> when I actually care just about the first one. Thus I dunno how to select
> the variable I really one see. If try this I get an error message:
>
>> quartz()
>> missmap(k1[,1],csvar=3,tsvar=2)
> Error in colMeans(is.na(obj)) :
>   'x' must be an array of at least two dimensions
>
> If I do the following code I get the attached graph, which is really the
> thing I wanna plot:
>
>  k1 <-cbind(data1$INFMORT,data1$YEAR,data1$COUNTRY)
>> k1 <-as.data.frame(k1)
>> k1 <- as.matrix(k1)
>> str(k1)
>  num [1:4126, 1:3] 160 NA NA NA NA ...
>  - attr(*, "dimnames")=List of 2
>   ..$ : NULL
>   ..$ : chr [1:3] "V1" "V2" "V3"
>> dim(k1)
> [1] 4126    3
>> head(k1)
>       V1   V2 V3
> [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=3,tsvar=2)
>
> Thank your for your time!
>