Displaying 20 results from an estimated 1000 matches similar to: "Generalized Additive Models: How to create publication-ready regression tables"
2010 Jun 21
1
Latex outputs of multilevel models
Hi,
I have a number of multilevel models and I would like some Latex outputs
of them. I usually use the "apsrtable" package, but it does not accept
"lme" outputs. Neither does the "mtable" function in the "memisc"
package. Is there any good alternative that I am missing?
Thanks, Jonas
2011 Dec 12
1
Package/command for creating a table of panel models ?
Hello Everyone
(Quick) question: Does anyone know a package/command or simply a way of
creating a table of different panel data estimations (estimated using
/*plm()*/ ) just as *mtable()* does for models estimated with /*lm()*/?
It seems *mtable* (and *apsrtable* equally) only support /*lm*/ and some
other classes but unfortunately not /*plm*/. I am pretty sure others must
have encountered this
2011 Jan 06
2
memisc-Tables with robost standard errors
Hello,
I've got a question concerning the usage of robust standard errors in
regression using lm() and exporting the summaries to LaTeX using the
memisc-packages function mtable():
Is there any possibility to use robust errors which are obtained by
vcovHC() when generating the LateX-output by mtable()?
I tried to manipulate the lm-object by appending the "new" covariance
2011 Jul 13
1
apsrtable package notes no longer working?
Hi all,
I have used the apsrtable package to generate tables (using LaTeX and Sweave) for quite some. However, suddenly the notes option in the package appears to have stopped working (or I am doing something wrong). So, when I try to run the following commands (in the R console):
> attach(NatExp.df)
> model1.lm <- lm((1-schoolspend) ~ jadif)
> model2.lm <- lm((1-nohousdisc) ~
2013 Oct 12
1
export glht to LaTeX
Hi,
I want to export the result of glht in R into a LaTeX table, such as that result:
Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
Group1 - Group2 == 0 -0.14007 0.01589 -8.813 <0.001 "***"
Group1 - Group3 == 0 -0.09396 0.01575 -5.965 <0.001 ***
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05
2011 Mar 19
2
Output a table formatted with standard deviations below means
Is it in bad form to double post to StackOverflow and R-help? Apologies if
so. Here's my task:
I've got a matrix of means like so
means<-matrix(1:10,nrow=2)
colnames(means)<-c("a","b","c","d","e")
and a matrix of standard deviations like so
sds<-matrix(seq(0.1,1,by=0.1),nrow=2)
2011 May 12
1
Saving misclassified records into dataframe within a loop
Greetings R world,
I know some version of the this question has been asked before, but i need
to save the output of a loop into a data frame to eventually be written to a
postgres data base with dbWriteTable. Some background. I have developed
classifications models to help identify problem accounts. The logic is this,
if the model classifies the record as including variable X and it turns out
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
2011 Jan 26
2
Extracting the terms from an rpart object
Hello all,
I wish to extract the terms from an rpart object.
Specifically, I would like to be able to know what is the response variable
(so I could do some manipulation on it).
But in general, such a method for rpart will also need to handle a "." case
(see fit2)
Here are two simple examples:
fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
fit1$call
fit2 <-
2011 Apr 22
3
Parametrized object name in Save statement
Greetings All,
I am looking to write a parametrized Rscript that will accept a variable
name(that also is the name of the flat file), transform the data into a data
frame and preform various modeling on the structure and save the output and
plot of the model. In this example i am using a rpart decision tree. The
only problem i am having is integrating the parameter into the internal
object name
2010 Apr 11
1
MCMC results into LaTeX
Dear All,
What is the preferred way to get Bayesian analysis results (such as
those from MCMCpacki, MCMCglmm, and DPpackage) into LaTeX table
automatically? I have been using the "apsrtable" package and similar
functions in "memisc" package, but neither seems to handle MCMC output
directly. Many thanks.
Shige
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart.
In short, the issue has to do with how rpart evaluates a formula and
supporting arguments, in particular 'weights'.
A simple contrived example is
-----------------------------------------------------------------------------
library(rpart)
## using data from help(rpart), set up simple example
myformula <-
2002 Apr 29
2
RPart
I am using the rpart package and seem to have trouble with data sets that
have columns with no data. I look at the column data in R and all values are
NA. When this occurs, I get nothing back from the rpart function. Is there a
way to get the rpart package to ignore these columns, without knowing what
columns are empty? I have tried the na.action=na.omit and
na.action=na.exclude, but neither one
2003 May 24
1
...listable functions...
Hi R-helpers.
I have the following problem:
I would like to apply my function gain(df,X,A) to a
list of arguments.
df is a data frame
X,A are the varibales od data frame.
When I do
> gain(kyphosis,"Kyphosis",c("Start","Number"))
[1] "Start" "Number"
I get the following error...
Error in unique.default(x) : unique() applies only to
vectors
I
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
2010 Dec 13
2
rpart.object help
Hi,
Suppose i have generated an object using the following :
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
And when i print fit, i get the following :
n= 81
node), split, n, loss, yval, (yprob)
* denotes terminal node
1) root 81 17 absent (0.7901235 0.2098765)
2) Start>=8.5 62 6 absent (0.9032258 0.0967742)
4) Start>=14.5 29 0 absent (1.0000000
2012 Mar 04
1
rpart package, text function, and round of class counts
I run the following code:
library(rpart)
data(kyphosis)
fit <- rpart(Kyphosis ~ ., data=kyphosis)
plot(fit)
text(fit, use.n=TRUE)
The text labels represent the count of each class at the leaf node.
Unfortunately, the numbers are rounded and in scientific notation rather
than the exact number of examples sorted by that node in each class.
The plot is supposed to look like
2011 Aug 04
1
How to get the test statistic corresponding to the p-value in mtable?
Dear R-Users,
I want to use mtable from package "memisc" to produce Latex-style estimation
output. However, mtable() only gives me a p-value and not the corresponding
test-statistic. Does anyone know how to extract it, either from a glm/anova
object or mtable? Here is a short example:
# Run this ####################
install.packages("memisc")
library(memisc)
set.seed(1)
2009 Dec 14
1
RPART - printing full splitting rule number on tree plot
Dear R-users
I am using RPART package to get regression trees. However having trouble getting the text function to put the full splitting rule number on the plot, instead to puts it in scientific notation. When a covariate has 1e4 or greater number of digits then the splitting rule number displayed on the plot is in scientific notation. But print.rpart displays the splitting rules in full.
2012 Apr 12
2
enableJIT(2) causes major slow-up in rpart
Hello,
Due to exploration of the JIT capabilities offered through the {compiler}
package, I came by the fact that using enableJIT(2) can *slow* the rpart
function (from the {rpart} package) by a magnitude of about 10 times.
Here is an example code to run:
library(rpart)
require(compiler)
enableJIT(0) # just making sure that JIT is off # We could also use
enableJIT(1) and it would be fine
fo