in reply to finding R-squared..please help

I am kind of a math and science ignoramus, but I don't have any idea what "R-squared" is. Is it a math function? The square of some number you're reading? Or something else? What do you need your sub to return?

I think, immediately, you probably need to break the lines you read into fields. You seem to be passing whole lines of data to your sub, correct? Is that what you want to do? When the sub receives them, you probably need to have something like this:

my @dos = split(/\s*/, $dosage); # Split $dosage into an array at +the spaces between the numbers my @geno = split(/\s*/, $genotype); # Do the same thing for $genotype

After that, I'm not sure what you want to do.

Replies are listed 'Best First'.
Re^2: finding R-squared..please help
by JavaFan (Canon) on Feb 18, 2012 at 21:42 UTC
    I am kind of a math and science ignoramus, but I don't have any idea what "R-squared" is.
    That's why we have Google and Wikipedia. Really, if you don't know what it is, and are too lazy too look it up, you can also decide not to answer, and leave an answer for someone who knows what it is.

    We don't want to spoon feed people who come here with questions, and expect people asking questions to do some research. But that works both way. "R-squared" is well known enough that it doesn't need explaining -- someone who can answer the question will know what it is; someone who doesn't know what it is, is likely not being able to answer the question.

      Forgive me. I was under the mistaken impression that this forum was about Perl programming. Perl I know, and enjoy offering help regarding, and despite my other shortcomings, I hoped my comment might be helpful. I was also under the impression, perhaps mistakenly, that the person asking the question knew what the function was, and didn't need to be told this or how to work it mathematically.