Hello,

I'm trying to calculate non-parametric probabilities using the np package
and having some difficulties.
OS is Windows, R version 2.11.1

Here is what I've done so far.

library(np)

veg <- data.frame(factor(Physiogomy), meanAnnualDepthAve, TP)

attach(veg) : for clarification dim(veg) returns 1292 3

fy.x <- npcdens(veg$factor.Physiogomy ~ veg$meanAnnualDepthAve, nmulti=1)
#  this works, but I haven't found any information explaining what the
nmulti=1 term is doing?  Does this set the number of levels in the factor?
My data actually has 8 types, can I develop this to treat each one in a
single function ?

veg.eval <- data.frame(Physiogomy = factor('Marl"}, meanAnnualDepthAve =
seq(min(meanAnnualDepthAve), max(meanAnnualDepthAve))
#  This also works, however where does the 4755 records originate

str(veg.eval)
' data.frame':   4755 obs of 2 variables
 $  Physiogomy                    : factor w / 1 level  "Marl" :   1   1
1  1  ....
 $ meanAnnualDepthAve     : num   -592, -591 - 590  - 578

because the data frame veg only contains 1292 records the is a mismatch
between the 4755 records.  Why are so many records produced in the veg.eval
statement and how can i constrain it to be consistent with the dimensions of
veg ?

plot(x, y, type = "l", lty="2", col='red' , xlab = "Mean Annual Depth",
ylab="Estimated Prob of Marl")
 lines(veg.eval$meanAnnualDepthAve, predict(fy.x, newdata=veg.eval),
col='blue')

I'm following an example I found Here:
http://en.wikipedia.org/wiki/Density_estimation

Your help is greatly appreciated.

Thanks
Steve

	[[alternative HTML version deleted]]

