Displaying 9 results from an estimated 9 matches for "tstdf".
Did you mean:
testdf
2007 Dec 17
2
more structure than 'str'?
How can I see more of the structure than displayed by 'str'?
Consider the following:
tstDF <- data.frame(a=1, row.names='b')
> str(tstDF)
'data.frame': 1 obs. of 1 variable:
$ a: num 1
The object 'tstDF' has row.names, but I have to suspect they are
there -- AND know a function like 'row.names' or 'dimnames' -- to see
them...
2003 Jun 22
1
Using weighted.mean() in aggregate()
Dear R users, I have a question on using weighted.mean() while aggregating a
data frame. I have a data frame with columns Sub, Length and Slope:
> x[1:5,]
Sub Length Slope
1 2 351.547 0.0025284969
2 2 343.738 0.0025859390
3 1 696.659 0.0015948968
4 2 5442.338 0.0026132544
5 1 209.483 0.0005304225
and I would like to calculate the weighted.mean of Slope, using Length
2011 Mar 11
1
Error in plot.lm
I am encountering an error with plot.lm:
> tstdf <- data.frame( y=c(1.01,1.98,3.02,3.99),x=c(1,2,3,4))
> plot(lm(I(y) ~ x, data=tstdf))
Hit <Return> to see next plot:
Hit <Return> to see next plot:
Error in object$coefficients : $ operator is invalid for atomic vectors
Obviously I don't need the I() in this example, but I h...
2004 Dec 04
1
AIC, AICc, and K
How can I extract K (number of parameters) from an AIC calculation, both to
report K itself and to calculate AICc? I'm aware of the conversion from AIC ->
AICc, where AICc = AIC + 2K(K+1)/(n-K-1), but not sure of how K is calculated
or how to extract that value from either an AIC or logLik calculation.
This is probably more of a basic statistics question than an R question, but I
thank
2005 Oct 12
2
functions available for use with aggregate?
What are the functions available for use with “aggregate”? Where can a reference to them be found?
---------------------------------
[[alternative HTML version deleted]]
2005 Jun 17
3
Fit values for NA's in linear regression
Hi,
To obtain estimates for some missing values in my data I fitted a
linear regression and then used the command fitted(model) to get the
fitted values from the model, but R doesn't return any values for the
NA's. I can calculate the fitted values from the estimates obtained
from the summary of model, but that's not very handy. Is there a way to
include the missing values in the
2003 Aug 14
2
nls confidence intervals
Hi,
Does anyone know how to compute the confidence prediction intervals for
a nonlinear least squares models (nls)?
I was trying to use the function 'predict' as I usually do for other
models fitting (glm, lm, gams...), but it seems that se.fit, and
interval computation is not implemented for the nls...
Cheers
Enrique
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fisheries Research Services,
Marine
2005 Jul 15
1
2D contour predictions
Hi All
I have been fitting regression models and would now like to produce some
contour & image plots from the predictors.
Is there an easy way to do this? My current (newbie) experience with R
would suggest there is but that it's not always easy to find it!
f3 <- lm( fc ~ poly( speed, 2 ) + poly( torque, 2 ) + poly( sonl, 2 ) +
poly( p_rail, 2 ) + poly( pil_sep, 2 ) + poly( maf, 2
2003 Aug 14
0
Bug in numericDeriv (was: [R] nls confidence intervals) (PR#3746)
Moved from r-help:
On Thu, 14 Aug 2003 09:08:26 -0700, Spencer Graves
<spencer.graves@pdf.com> wrote :
>p.s. The following command in S-Plus 6.1 seems to work fine but
>produces an error in R 1.7.1:
>
>nls(y~a, data=tstDf, start=list(a=1))
>Error in nlsModel(formula, mf, start) : singular gradient matrix at
>initial parameter estimates
This looks like a bug in numericDeriv, which finds a derivative of 0
rather than 1 for da/da. I've cc'd the author.
Duncan