Displaying 2 results from an estimated 2 matches for "idplot".
Did you mean:
cdplot
2008 Feb 11
1
Gini index of frequencies in a data frame
Dear All,
I wish to calculate the Gini index (ineq from same package) and some other indices for the diameter distribution of each plot (df dgtot).
dgtot:
IDPlot Diameter(cm)
1 4 34.0
2 4 23.0
3 4 38.0
...
51 5 16.0
52 5 8.0
53 5 9.0
...
5301 140 25.0
5302 140 12.0
5303 140 7.0
I use:
> aggregate(dgtot,by=list(dgtot$IDSupr),FUN=ineq(dsp))
where
dsp <- function(x) # compute frequency distri...
2011 Mar 18
0
adding a cubic spline to a model
...NLME biological growth model. After looking in the
R-help archive, I?ve tried the functions ns() and bs() from the splines-package
and rcs() from the Design-package:
?
M7.W<-nlme(model= RW ~ (R*(RPrevYear/K)^m)*ns(Year,4)*exp(m*((1-RPrevYear^2/K^2)/2)), data=data, fixed=R+K+m~1, random= R+K~1|IDPlot, start= c(R=3, K=90, m=0.1), correlation=corARMA(p=2, q=0, form= ~Year))
?
All of them
give the same error-message:
?
Error in
X[, fmap[[nm]]] <- gradnm :
? number of items to replace is not a multiple
of replacement length
?
Am I using
the ns() function wrongly or should I use another...