Friday, January 14, 2011

Stringr package in R

A new package from Hadley Wickham - a string processing package that "provides string functions that are simpler and more consistent [than existing functions in R], and also fixes some functionality that R is missing compared to other programming languages".

Thursday, January 13, 2011

R: how to extract parameter from AR1 fit in gls/nlme

fit = gls(y~pop,data=data,corr = corAR1(.5, form = ~ 1 | trio))

> coef(fit$model$corStruct,unconstrained = FALSE)

** without the unconstrained = FALSE option, it gives some other (?) number

Alternatively, intervals(fit)$corStruct gives a vector with confidence intervals 

> intervals(fit)$corStruct
      lower   est. upper
Phi1 -0.421 0.0384 0.482
[1] "Correlation structure:"

Subscribe via email

Enter your email address:

Delivered by FeedBurner