Estimation of genetic and environmental contributions to cancers falls in the framework of generalized linear mixed modelling with several random effect components. Computational challenges remain, however, in dealing with binary or survival phenotypes. In this paper, we consider the analysis of melanoma onset in a population of 2.6 million nuclear families in Sweden, for which none of the current survival-based methodologies is feasible. We treat the disease outcome as a binary phenotype, so that the standard proportional hazard model leads to a generalized linear model with the complementary-log link function. For rare diseases this link is very close to the probit link, and thus allows the use of marginal likelihood for the estimation of the variance components. We correct for the survival length bias by censoring the parent generation within each family at the time they attain the same cumulative hazard as the child generation, thus improving the validity of the estimates. Our finding that childhood shared environment in addition to genetic factors had a considerable effect on the development of melanoma is consistent with epidemiological studies.