[R] Generalized Additive Models: How to create publication-ready regression tables

Frank Harrell f.harrell at vanderbilt.edu
Sun Oct 9 17:06:22 CEST 2011


In many cases a flexible parametric fit, using regression splines, will
result in a fit that is as good as a gam, with similar regression shapes. 
The rms package has a latex method that will represent such fits in
interpretable algebraic form.  latex(fit) does that, and print(fit,
latex=TRUE) will give a nice table though not formatted in the way you
described.
Frank

Emilio López wrote:
> 
> You may "build" your customized matrix merging the components of the
> objects
> before calling the xtable function:
> 
> my.matrix <- rbind(model$coefficients, [vector containing errors])
> xtable(my.matrix)
> 
> (I'm sorry I don't know exactly where the standard errors are stored / how
> to compute them)
> You can paste parentheses before and after the number with the paste
> function.
> 
> Best,
> Emilio
> 
> 
> Maybe your can manipulate the standard errors in the object as text,
> pasting
> the parenthesis before and after with the paste function (before you call
> the xtable function)
> 
> 2011/10/8 davidyeager <dyeager@>
> 
>> Thanks!
>>
>> Yes, that produces tables that are formatted in the same way as the gam
>> output.  I'm hoping to have publication-ready tables that have standard
>> errors in parentheses listed below coefficients.  Do you know of a method
>> to
>> do that?
>>
>> David
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/Generalized-Additive-Models-How-to-create-publication-ready-regression-tables-tp3884432p3885238.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help@ mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@ mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 


-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/Generalized-Additive-Models-How-to-create-publication-ready-regression-tables-tp3884432p3887519.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list