Skip to content
Back to formatted view

Raw Message

Message-ID: <4336DCCF.3020808@usa.com>
Date: 2005-09-25T17:22:23Z
From: Knut Krueger
Subject: hist(x, ...)  with  normal distribution  curve
In-Reply-To: <43381DA9.2050002@free.fr>

Romain Francois schrieb:

>Do you want that :
>
>h<-hist(x,breaks=10,freq = TRUE) 
>xfit<-seq(min(x),max(x),length=40) 
>yfit<-dnorm(xfit,mean=mean(x),sd=sd(x)) 
>
>lines(xfit,yfit * 150 * (h$breaks[2]-h$breaks[1]))
>
>
>  
>
Right thats what I want ... but does it make sense to fit the line with 
a try and error multipier (150)

Is there no way to compute the frequency and the distribution line with 
standardised function?
I used SPSS with the data from x<-5+rnorm(150)
Hit the graph-histogramm menue choosed: display normal curve and got the 
result:
http://biostatistic.de/temp/spss1.jpg - just as easy as possible

So, they have any standardised function.
maybe it does not make sence, but i am not able to see why there is such 
a esay to use function in SPSS but not in R
Maybe anybody is able to explane whiy


and my intention:
As a previous computer scientist I am trying to find a way to eleminate 
SPSS an use R
Sure there is a big lack of my statistic knowledge - but the often the 
SPSS user have similar lack  but it is easy to click and view instead to 
try the similar steps in R
But if I am not able to find the steps in R for the common .. 
"SPSS-clicks" , I will never be able to suggest R in the institute to 
the people with mor statistical knowledge but no knowledge about 
computer science ... and command line interpreter

Regards Knut




-- 
Viele Gr????e
Knut Kr??ger
-- 

          Reitpark Einthal

    Leitung: 1 Tierarzt, 1 Berufsreiter 
     Homepage http://www.einthal.de

Eine fachgerechte Betreuung rund um die Uhr.