We study the equation of state (EOS) for dense matter in the core of the compact star with hyperons and calculate the star structure in an effective model in the mean field approach. With varying incompressibility and effective nucleon mass, we analyse the resulting EOS with hyperons in beta equilibrium and its underlying effect on the gross properties of the compact star sequences. The results obtained in our analysis are compared with predictions of other theoretical models and observations. The maximum mass of the compact star lies in the range $1.21-1.96 ~M_{odot}$ for the different EOS obtained, in the model.