Displaying 4 results from an estimated 4 matches for "l_yx".
2011 Dec 09
3
gam, what is the function(s)
Hello,
I'd like to understand 'what' is predicting the response for library(mgcv)
gam?
For example:
library(mgcv)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101)
plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l")
I want to see the generalized function(s) used to predict the response that
is plotted above. In other words, f(x) = {[what?]}. I'm new to gam...
2012 Mar 14
1
gam - Y axis probability scale with confidence/error lines
Hello,
How do I plot a gam fit object on probability (Y axis) vs raw values (X
axis) axis and include the confidence plot lines?
Details...
I'm using the gam function like this:
l_yx[,2] = log(l_yx[,2] + .0004)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
And I want to plot it so that probability is on the Y axis and values are
on the X axis (i.e. I don't want log likelihood on the Y axis or the log of
my values on my X axis):
xx <- seq(min(l_yx[,2]),...
2011 Dec 01
1
logistic regression - glm.fit: fitted probabilities numerically 0 or 1 occurred
...Y=1 (response=1) or the other way around). I don't feel my
data has this issue. Please point out how it does!
The list post instructions state that I can attach pdf's, so I attached
plots of my data right before I do the call to glm.
The attachments are plots of my data stored in variable l_yx (as can be
seen in the axis names):
My response (vertical axis) by row index (horizontal axis):
plot(l_yx[,1],type='h')
My predictor variable (vertical axis) by row index index (horizontal axis):
plot(l_yx[,2],type='h')
So here is more info on my data frame/data (in case you can...
2012 May 03
2
GAM, how to set qr=TRUE
Hello,
I don't understand what went wrong or how to fix this. How do I set qr=TRUE
for gam?
When I produce a fit using gam like this:
fit = gam(y~s(x),data=as.data.frame(l_yx),family=family,control =
list(keepData=T))
...then try to use predict:
(see #1 below in the traceback() )
> traceback()
6: stop("lm object does not have a proper 'qr' component.\n Rank zero or
should not have used lm(.., qr=FALSE).") at #81
5: qr.lm(object) at #81
4: summary....