tabtexanova | R Documentation |
Function to create a LaTeX file of an ANOVA table.
Function to create a LaTeX file for a table with the main fitting statistics from a fitted regression model.
tabtexanova(
mod = mod,
nametab = nametab,
cap = cap,
save.file = FALSE,
filename = "tabregre.tex",
eng = TRUE,
rowlab = "Source of variation",
decnum = 3,
font.size.tab = "normalsize",
font.type.tab = "normalfont"
)
tabtexregre(
mod = mod,
nametab = nametab,
cap = cap,
save.file = FALSE,
filename = "tabregre.tex",
eng = TRUE,
rowlab = "Parameter",
decnum = 3,
font.size.tab = "normalsize",
font.type.tab = "normalfont"
)
mod |
an object containing the fitted model by using
the |
nametab |
a string having a brief name to be used in
both the label of the table and the file name. For instance,
if "=mod1", the table can be refered in your LaTeX
document by using |
cap |
a string having the caption of the LaTeX table. |
save.file |
The defauls is set to “FALSE”, if is set to
TRUE, then the option |
filename |
A string having the name of the resulting LaTeX file having the table. The default is set to "tabdescdata.tex". |
eng |
The language to be used in the output. English
is the default, meanwhile if |
rowlab |
a character with the name to be used as label for the column where the variables will be printed. The default is set to "Parameter". |
decnum |
the number of decimals to be used in the output. The default is set to 3. |
font.size.tab |
The defauls is set to "normalsize". You could also try with "footnotesize". |
font.type.tab |
The defauls is set to "normalfont". |
The resulting file is a LaTeX table, that can be
added to your main LaTeX document by using \input{filename}
.
The resulting file is a LaTeX table, that can be
added to your main LaTeX document by using \input{filename}
.
This function creates a LaTeX file having an ANOVA table, from a fitted regression model.
This function creates a LaTeX file having the main fitting statistics of a linear regression model.
Christian Salas-Eljatib.
Salas-Eljatib, C. 2021. Análisis de datos con el programa estadístico R: una introducción aplicada. Ediciones Universidad Mayor, Santiago, Chile. 170 p. https://eljatib.com/rlibro
Salas-Eljatib, C. 2021. Análisis de datos con el programa estadístico R: una introducción aplicada. Ediciones Universidad Mayor, Santiago, Chile. 170 p. https://eljatib.com/rlibro
df <- datana::fishgrowth2
head(df)
descstat(df[,c("largo","edad")])
plot(largo ~ edad, data=df)
mod1<-lm(largo ~ edad, data=df)
##example 1
tabtexanova(mod=mod1,nametab="anovatab",
cap="ANOVA-style table of the fitted regression model")
##example 2
tabtexanova(mod=mod1,nametab="anovatab",
cap="Cuadro estilo ANOVA para modelo de regresion ajustado",
eng=FALSE)
df <- datana::fishgrowth2
head(df)
datana::descstat(df[,c("largo","edad")])
graphics::plot(largo ~ edad, data=df)
mod1<-stats::lm(largo ~ edad, data=df)
## Example 1
tabtexregre(mod=mod1,nametab="basicmodel",
cap="Parameter estimates of the fitted regression model")
## Example 2
tabtexregre(mod=mod1,nametab="basicmodel",
cap="Cuadro con parametros estimados del modelo de regresion",
eng=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.