similar to: Getting and using a function

Displaying 20 results from an estimated 20000 matches similar to: "Getting and using a function"

2010 Oct 06
5
R: Tools for thinking about data analysis and graphics
I'm giving a talk about some aspects of language and conceptual tools for thinking about how to solve problems in several programming languages for statistical computing and graphics. I'm particularly interested in language features that relate to: o expressive power: ease of translating what you want to do into the results you want o elegance: how well does the code provide a simple
2003 Sep 16
2
gam and concurvity
Hello, in the paper "Avoiding the effects of concurvity in GAM's .." of Figueiras et al. (2003) it is mentioned that in GLM collinearity is taken into account in the calc of se but not in GAM (-> results in confidence interval too narrow, p-value understated, GAM S-Plus version). I haven't found any references to GAM and concurvity or collinearity on the R page. And I
2001 Dec 22
2
gam plots
Dear R users, Using the library(mgcv) and running R under MacOSX, I have fitted a generalised additive model with binomial errors in order to check the linearity of two continuous variables ap2mm and diffdaysm in a glm: > mymodel.gam <- gam(diedhos~ s(ap2mm) + Dweekm + s(diffdaysm) + Dweekm:diffdaysm + ap2mm:Dweekm, binomial) I would like postscript gam plots for the two smoothed
2005 Sep 26
4
p-level in packages mgcv and gam
Hi, I am fairly new to GAM and started using package mgcv. I like the fact that optimal smoothing is automatically used (i.e. df are not determined a priori but calculated by the gam procedure). But the mgcv manual warns that p-level for the smooth can be underestimated when df are estimated by the model. Most of the time my p-levels are so small that even doubling them would not result
2006 Jan 02
1
An embarrassment of riches
I have a dataset which I am trying to smooth, using locally weighted regression. The y values are count data, integers with Poisson distribution, and it is important for the regression function to know this, since assuming a Gaussian distribution will lead to substantial errors. It is a time series; the x values have equal five minute intervals. Here is the problem: I have an embarrassment
2006 Sep 05
3
terms.inner
Question: I am trying to impliment a function in R that we use quite regularly in Splus, and it fails due to a lack of the "terms.inner" function in R. The substitute is? Part question and part soapbox: Why remove terms.inner from R? It's little used, but rather innocuous. Mostly soapbox: I figured it was no big deal, as I originally discovered the use of terms.inner from
2004 Sep 27
2
passing formula arg to mgcv::gam
Hi, I have a function, callGam, that fits a gam model to a subset of a dataframe. The argument to callGam is a formula, the subset is determined inside the function itself. My na??ve approach generates and error, see below. I guess this is because 'idx' is loocked up in the environment of 'formula', but I am too ignorant about environments to be able to tell for sure. Could
2006 Jul 28
1
could someone help me to install packages "gam" (ubuntu 6.06)
> install.packages("gam") Warning in install.packages("gam") : argument 'lib' is missing: using /usr/local/lib/R/site-library --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/gam_0.97.tar.gz' Content type 'application/x-gzip' length 89613 bytes opened URL
2004 Oct 26
3
GLM model vs. GAM model
I have a question about how to compare a GLM with a GAM model using anova function. A GLM is performed for example: model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial", na.action = na.exclude) A second nested model could be: model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action = na.exclude) To compare these two GLM
2004 Dec 22
2
GAM: Getting standard errors from the parametric terms in a GAM model
I am new to R. I'm using the function GAM and wanted to get standard errors and p-values for the parametric terms (I fitted a semi-parametric models). Using the function anova() on the object from GAM, I only get p-values for the nonparametric terms. Does anyone know if and how to get standard errors for the parametric terms? Thanks. Jean G. Orelien
2006 Dec 27
1
Question about predict function
I am working with a non-parametic smoothing operation using a Generalized Additive Model. It is a bivariate data set. I know how to do the smooth, and out comes a nice smooth curve. Now I want to find the value of the smoothed curve for several values of x (the abscissa). This can be done (please correct me if I am wrong) by using the predict.gam function. You feed the predict.gam function a
2014 Nov 25
1
failed login message
thanks for your reply i intentionaly put the wrong password and checked the dovecot log and the message i got was # tail -f /var/log/dovecot.log | grep "xxx at yyy.com" Nov 25 08:47:46 imap-login: Info: Aborted login (auth failed, 1 attempts in 2 secs): user=<xxx at yyy.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<xObTWqYIwgB/AAAB> but in the
2008 May 06
1
mgcv::gam shrinkage of smooths
In Dr. Wood's book on GAM, he suggests in section 4.1.6 that it might be useful to shrink a single smooth by adding S=S+epsilon*I to the penalty matrix S. The context was the need to be able to shrink the term to zero if appropriate. I'd like to do this in order to shrink the coefficients towards zero (irrespective of the penalty for "wiggliness") - but not necessarily all the
2005 Mar 24
1
Prediction using GAM
Recently I was using GAM and couldn't help noticing the following incoherence in prediction: > data(gam.data) > data(gam.newdata) > gam.object <- gam(y ~ s(x,6) + z, data=gam.data) > predict(gam.object)[1] 1 0.8017407 > predict(gam.object,data.frame(x=gam.data$x[1],z=gam.data$z[1])) 1 0.1668452 I would expect that using two types of predict arguments
2013 Jul 08
1
error in "predict.gam" used with "bam"
Hello everyone. I am doing a logistic gam (package mgcv) on a pretty large dataframe (130.000 cases with 100 variables). Because of that, the gam is fitted on a random subset of 10000. Now when I want to predict the values for the rest of the data, I get the following error: > gam.basis_alleakti.1.pr=predict(gam.basis_alleakti.1, +
2010 Dec 14
2
Use generalised additive model to plot curve
Readers, I have been reading 'the r book' by Crawley and think that the generalised additive model is appropriate for this problem. The package 'gam' was installed using the command (as root) install.package("gam") ... library(gam) > library(gam) Loading required package: splines Loading required package: akima > library(mgcv) This is mgcv 1.3-25 Attaching
2007 Jun 22
1
two basic question regarding model selection in GAM
Qusetion #1 ********* Model selection in GAM can be done by using: 1. step.gam {gam} : A directional stepwise search 2. gam {mgcv} : Smoothness estimation using GCV or UBRE/AIC criterion Suppose my model starts with a additive model (linear part + spline part). Using gam() {mgcv} i got estimated degrees of freedom(edf) for the smoothing splines. Now I want to use the functional form of my model
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2004 Aug 06
2
gam --- a new contributed package
I have contributed a "gam" library to CRAN, which implements "Generalized Additive Models". This implementation follows closely the description in the GAM chapter 7 of the "white" book "Statistical Models in S" (Chambers & Hastie (eds), 1992, Wadsworth), as well as the philosophy in "Generalized Additive Models" (Hastie & Tibshirani 1990,
2007 Apr 08
1
Relative GCV - poisson and negbin GAMs (mgcv)
I am using gam in mgcv (1.3-22) and trying to use gcv to help with model selection. However, I'm a little confused by the process of assessing GCV scores based on their magnitude (or on relative changes in magnitude). Differences in GCV scores often seem "obvious" with my poisson gams but with negative binomial, the decision seems less clear. My data represent a similar pattern as