1. A method for determining mineralogy of rock comprising: determining a model of arenites in the rock by using a processor to perform a first type of linear regression on a plurality of elemental dry weights of the rock based upon a sum of elemental dry weights of calcium and magnesium being at least a given value, or perform a second type of linear regression on the plurality of elemental dry weights based upon the sum of the elemental dry weights of elemental calcium and magnesium being less than the given value; determining a model of arkoses in the rock, by performing a third type of linear regression on the plurality of elemental dry weights, using the processor; determining a partitioning function, using the processor; and determining the mineralogy of the rock by using the processor to apply the partitioning function to the model of arenites and the model of arkoses, and add the model of arenites and the model of arkoses together to create a combined model.