We propose a variational wavefunction containing parameters to tune the probabilities of all the possible onsite configurations for the periodic Anderson model. We call it the full onsite-correlation wavefunction (FOWF). This is a simple extension of the Gutzwiller wavefunction (GWF), in which one parameter is included to tune the double occupancy of the f electrons at the same site. We compare the energy of the GWF and the FOWF evaluated by the variational Monte Carlo method and that obtained with the densitymatrix renormalization group method. We find that the energy is considerably improved in the FOWF. On the other hand, the physical quantities do not change significantly between these two wavefunctions as long as they describe the same phase, such as the paramagnetic phase. From these results, we not only demonstrate the improvement by the FOWF, but we also gain insights on the applicability and limitation of the GWF to the periodic Anderson model.