Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86784670E for ; Tue, 2 Aug 2011 19:31:30 +0000 (UTC) Received: (qmail 10272 invoked by uid 500); 2 Aug 2011 19:31:29 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 9970 invoked by uid 500); 2 Aug 2011 19:31:28 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Delivered-To: moderator for user@commons.apache.org Received: (qmail 4591 invoked by uid 99); 2 Aug 2011 19:25:15 -0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of danwalkeriv@gmail.com designates 209.85.161.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=VstSqh2GrK23ZSCacphlQJILmzR9DTxxWip8Y73O1Vw=; b=vofXdym6I9cKZ1XWe78lk14qIF1VxI98RDi0cqkoOYP1leN5Nc9GvTRuQ4paCw6eKi tvuxa7RjQuwRdfm7vcrr15xrSD+tlDYBacUiqaedD/OODnZWUOMPE5JVBK3/iNDwdBK0 9adTBiGPupJXIGoR7j4aVF+aWs1jnNccD5GN8= MIME-Version: 1.0 From: dan Date: Tue, 2 Aug 2011 13:24:28 -0600 Message-ID: Subject: [math] Help with OLSMultipleLinearRegression To: user@commons.apache.org Content-Type: text/plain; charset=ISO-8859-1 I have been using the OLSMultipleLinearRegression class successfully for a while now, but I am having trouble in my current application. The code is very simple, and looks like this: OLSMultipleLinearRegression regression = new OLSMultipleLinearRegression(); regression.setNoIntercept(true); regression.newSampleData(ys, z_bars); double [] new_eta = regression.estimateRegressionParameters(); When I run this code with my current data, all of the regression coefficients come back as NaNs. In the input data, the z_bars are vectors that have been normalized to sum to 1, and the ys are the logs of the "true" response variables (I am trying to reproduce the results from a research paper, in which it was claimed that logging the response variables made them more normally distributed, resulting in a better fit). Is there something wrong with my setup? It seems like, even if the logged data is not very linear, that it should still be possible to obtain some OLS fit, even if it is a poor one. Any help would be appreciated. Thank you, Dan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org