It is shown that a q-periodic sequence over the finite field Fq passes an extended version of Marsaglia's lattice test for high dimensions if and only if its linear complexity is large. The consequences of this result for nonlinear and inversive pseudorandom number generators are worked out.