Skip to content

Doubts about chi-square distribution

2 messages · Jose Claudio Faria, Peter Dalgaard

#
Dear list,

For educational purposes I have been working with the script below.

I have a observation:

   line 31

   #CScal[i] = (amo^2)  # IT IS WRONG, I KNOW, BUT IT MAKE R TO CRASHES!

   I'm thinking this is a possible bug in the R!


And I have a couple of doubts:

1) line 51

    #curve(dchisq(x, n-1), add = T, col = 'red'

    I think that it is correct, but the function no match with the observed 
distribution.

    curve(dchisq(x, n), add = T, col = 'red') matches, so, what is wrong?

2) Plot

    I would like to distance the Ylabel from the left limit of the screen, is it 
possible?

Many thanks,
#
Jos?? Cl??udio Faria <joseclaudio.faria at terra.com.br> writes:
Possibly, but ***WHICH R?*** 

I see a segmentation fault on 1.9.1 on i386 but an error message with
2.0.1 on Opteron.
 
(We did remember to tell you to include full version information in
the posting guide, did we not?)