Trying to turn my tex file into regression table - (Note: I am a beginner)Extracting the contents of text in a specified environment into a new fileIn Lyx turn greyed out text into commentsCompile just a part of the contents in a .tex fileInserting document compiled from LaTex code inside a .tex fileInjecting text contained in file into custom environmentTrying to increment counter in tableHELP tex file no more compiled after texstudio crashHow do I include a figure or table into the exercise environment of the Legrand Orange Book templateHow do I create colored table note enviroment?
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
Calculate Levenshtein distance between two strings in Python
Is every set a filtered colimit of finite sets?
Denied boarding due to overcrowding, Sparpreis ticket. What are my rights?
Lied on resume at previous job
Need help identifying/translating a plaque in Tangier, Morocco
Crop image to path created in TikZ?
Are cabin dividers used to "hide" the flex of the airplane?
Pristine Bit Checking
Is this food a bread or a loaf?
Finding files for which a command fails
Shall I use personal or official e-mail account when registering to external websites for work purpose?
Why do UK politicians seemingly ignore opinion polls on Brexit?
Can a planet have a different gravitational pull depending on its location in orbit around its sun?
Check if two datetimes are between two others
Why airport relocation isn't done gradually?
How can I add custom success page
I see my dog run
Could a US political party gain complete control over the government by removing checks & balances?
Latin words with no plurals in English
Are objects structures and/or vice versa?
Was there ever an axiom rendered a theorem?
If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?
Weird behaviour when using querySelector
Trying to turn my tex file into regression table - (Note: I am a beginner)
Extracting the contents of text in a specified environment into a new fileIn Lyx turn greyed out text into commentsCompile just a part of the contents in a .tex fileInserting document compiled from LaTex code inside a .tex fileInjecting text contained in file into custom environmentTrying to increment counter in tableHELP tex file no more compiled after texstudio crashHow do I include a figure or table into the exercise environment of the Legrand Orange Book templateHow do I create colored table note enviroment?
I am saved some regression tables as a tex file. Then when I try to save it as a pdf, it ends up coming out damaged. Then when I try to typeset it, it says: "!LaTeX Error: Environment table undefined."
This is my tex file:
begintable[htbp]centering
defsym#1ifmmode^#1else(^#1)fi
captionLogistic regression tablelabeltab1
begintabularl*4c
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endtabular
endtable
I am really new to this so would appreciate any help I can get. If I am breaking any guidelines on asking questions, apologies and let me know how I can fix it. Many thanks in advance!
Best,
M. Qamar
environments
New contributor
add a comment |
I am saved some regression tables as a tex file. Then when I try to save it as a pdf, it ends up coming out damaged. Then when I try to typeset it, it says: "!LaTeX Error: Environment table undefined."
This is my tex file:
begintable[htbp]centering
defsym#1ifmmode^#1else(^#1)fi
captionLogistic regression tablelabeltab1
begintabularl*4c
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endtabular
endtable
I am really new to this so would appreciate any help I can get. If I am breaking any guidelines on asking questions, apologies and let me know how I can fix it. Many thanks in advance!
Best,
M. Qamar
environments
New contributor
Is that your entire tex file? Because it should begindocumentclassarticlebegindocument
and endenddocument
.
– Teepeemm
1 hour ago
Yes that is. This was the output from some regressions I ran on Stata. Should I just insert those lines at the beginning and end of the code?
– Mohamed Qamar
1 hour ago
add a comment |
I am saved some regression tables as a tex file. Then when I try to save it as a pdf, it ends up coming out damaged. Then when I try to typeset it, it says: "!LaTeX Error: Environment table undefined."
This is my tex file:
begintable[htbp]centering
defsym#1ifmmode^#1else(^#1)fi
captionLogistic regression tablelabeltab1
begintabularl*4c
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endtabular
endtable
I am really new to this so would appreciate any help I can get. If I am breaking any guidelines on asking questions, apologies and let me know how I can fix it. Many thanks in advance!
Best,
M. Qamar
environments
New contributor
I am saved some regression tables as a tex file. Then when I try to save it as a pdf, it ends up coming out damaged. Then when I try to typeset it, it says: "!LaTeX Error: Environment table undefined."
This is my tex file:
begintable[htbp]centering
defsym#1ifmmode^#1else(^#1)fi
captionLogistic regression tablelabeltab1
begintabularl*4c
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endtabular
endtable
I am really new to this so would appreciate any help I can get. If I am breaking any guidelines on asking questions, apologies and let me know how I can fix it. Many thanks in advance!
Best,
M. Qamar
environments
environments
New contributor
New contributor
edited 1 hour ago
Phelype Oleinik
24.9k54690
24.9k54690
New contributor
asked 1 hour ago
Mohamed QamarMohamed Qamar
1
1
New contributor
New contributor
Is that your entire tex file? Because it should begindocumentclassarticlebegindocument
and endenddocument
.
– Teepeemm
1 hour ago
Yes that is. This was the output from some regressions I ran on Stata. Should I just insert those lines at the beginning and end of the code?
– Mohamed Qamar
1 hour ago
add a comment |
Is that your entire tex file? Because it should begindocumentclassarticlebegindocument
and endenddocument
.
– Teepeemm
1 hour ago
Yes that is. This was the output from some regressions I ran on Stata. Should I just insert those lines at the beginning and end of the code?
– Mohamed Qamar
1 hour ago
Is that your entire tex file? Because it should begin
documentclassarticlebegindocument
and end enddocument
.– Teepeemm
1 hour ago
Is that your entire tex file? Because it should begin
documentclassarticlebegindocument
and end enddocument
.– Teepeemm
1 hour ago
Yes that is. This was the output from some regressions I ran on Stata. Should I just insert those lines at the beginning and end of the code?
– Mohamed Qamar
1 hour ago
Yes that is. This was the output from some regressions I ran on Stata. Should I just insert those lines at the beginning and end of the code?
– Mohamed Qamar
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
In the following example, I have added the missing documentclass as well as begindocument
and enddocument
. I've loaded the geometry
package in oder to have smaller margins and the longtable
package to allow page breaks within the table. In order to make the table narrower (as it exceeds the textwidth), I have used a fixed width p
type column that allows for automated linebreaks in the first column. In order to left align the contents of the first column, I have used the array
package and >raggedrightarraybackslash
.
documentclassarticle
usepackagegeometry
usepackagelongtable
usepackagearray
begindocument
defsym#1ifmmode^#1else(^#1)fi
beginlongtable>raggedrightarraybackslashp4cm*4c
captionLogistic regression tablelabeltab1\
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline endhead
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endlongtable
enddocument
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Mohamed Qamar is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483863%2ftrying-to-turn-my-tex-file-into-regression-table-note-i-am-a-beginner%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In the following example, I have added the missing documentclass as well as begindocument
and enddocument
. I've loaded the geometry
package in oder to have smaller margins and the longtable
package to allow page breaks within the table. In order to make the table narrower (as it exceeds the textwidth), I have used a fixed width p
type column that allows for automated linebreaks in the first column. In order to left align the contents of the first column, I have used the array
package and >raggedrightarraybackslash
.
documentclassarticle
usepackagegeometry
usepackagelongtable
usepackagearray
begindocument
defsym#1ifmmode^#1else(^#1)fi
beginlongtable>raggedrightarraybackslashp4cm*4c
captionLogistic regression tablelabeltab1\
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline endhead
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endlongtable
enddocument
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
add a comment |
In the following example, I have added the missing documentclass as well as begindocument
and enddocument
. I've loaded the geometry
package in oder to have smaller margins and the longtable
package to allow page breaks within the table. In order to make the table narrower (as it exceeds the textwidth), I have used a fixed width p
type column that allows for automated linebreaks in the first column. In order to left align the contents of the first column, I have used the array
package and >raggedrightarraybackslash
.
documentclassarticle
usepackagegeometry
usepackagelongtable
usepackagearray
begindocument
defsym#1ifmmode^#1else(^#1)fi
beginlongtable>raggedrightarraybackslashp4cm*4c
captionLogistic regression tablelabeltab1\
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline endhead
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endlongtable
enddocument
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
add a comment |
In the following example, I have added the missing documentclass as well as begindocument
and enddocument
. I've loaded the geometry
package in oder to have smaller margins and the longtable
package to allow page breaks within the table. In order to make the table narrower (as it exceeds the textwidth), I have used a fixed width p
type column that allows for automated linebreaks in the first column. In order to left align the contents of the first column, I have used the array
package and >raggedrightarraybackslash
.
documentclassarticle
usepackagegeometry
usepackagelongtable
usepackagearray
begindocument
defsym#1ifmmode^#1else(^#1)fi
beginlongtable>raggedrightarraybackslashp4cm*4c
captionLogistic regression tablelabeltab1\
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline endhead
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endlongtable
enddocument
In the following example, I have added the missing documentclass as well as begindocument
and enddocument
. I've loaded the geometry
package in oder to have smaller margins and the longtable
package to allow page breaks within the table. In order to make the table narrower (as it exceeds the textwidth), I have used a fixed width p
type column that allows for automated linebreaks in the first column. In order to left align the contents of the first column, I have used the array
package and >raggedrightarraybackslash
.
documentclassarticle
usepackagegeometry
usepackagelongtable
usepackagearray
begindocument
defsym#1ifmmode^#1else(^#1)fi
beginlongtable>raggedrightarraybackslashp4cm*4c
captionLogistic regression tablelabeltab1\
hlinehline
&multicolumn1c(1)&multicolumn1c(2)&multicolumn1c(3)&multicolumn1c(4)\
&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated&multicolumn1cundereducated\
hline endhead
undereducated& & & & \
0.isco1d & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
Manager & 4.117sym***& 4.218sym***& 4.181sym***& \
& (34.39) & (34.13) & (33.74) & \
[1em]
Professional & 3.035sym***& 2.408sym***& 2.440sym***& \
& (27.27) & (20.49) & (20.74) & \
[1em]
Technician and associated professionals & 5.513sym***& 5.516sym***& 5.608sym***& \
& (48.93) & (47.13) & (47.74) & \
[1em]
Clerical support workers & -2.061sym***& -2.061sym***& -2.018sym***& \
& (-4.47) & (-4.47) & (-4.38) & \
[1em]
Service and sales workers & -0.735sym***& -0.735sym***& -0.686sym***& \
& (-4.48) & (-4.48) & (-4.18) & \
[1em]
Agricultural, forestry workers & 2.185sym***& 2.185sym***& 1.983sym***& \
& (19.53) & (19.53) & (17.65) & \
[1em]
Craft and related trades occupations & 0.0605 & 0.0605 & 0.0367 & \
& (0.46) & (0.46) & (0.28) & \
[1em]
Plant and machine operators & -0.463sym** & -0.463sym** & -0.438sym** & \
& (-2.87) & (-2.87) & (-2.72) & \
[1em]
Elementary Occupations & 0 & 0 & 0 & \
& (.) & (.) & (.) & \
[1em]
female_mgr & & -0.355sym** & -0.269sym* & \
& & (-3.19) & (-2.39) & \
[1em]
female_prof & & 0.954sym***& 0.990sym***& \
& & (18.55) & (19.13) & \
[1em]
female_tech & & -0.00610 & 0.000279 & \
& & (-0.11) & (0.00) & \
[1em]
age & & & 0.0270sym***& 0.0309sym***\
& & & (22.69) & (9.41) \
[1em]
regions & & & -0.0340sym***& -0.0386sym***\
& & & (-5.41) & (-3.44) \
[1em]
Generic Programs & & & & 0 \
& & & & (.) \
[1em]
Education & & & & 1.208sym***\
& & & & (9.25) \
[1em]
Arts & Humanities & & & & -0.219 \
& & & & (-1.50) \
[1em]
Social sciences, journalism and information & & & & 0.0161 \
& & & & (0.14) \
[1em]
Business, administration and law & & & & -0.404sym***\
& & & & (-3.70) \
[1em]
Natural sciences, mathematics and statistics & & & & -0.479sym***\
& & & & (-3.36) \
[1em]
ICT & & & & -0.119 \
& & & & (-0.70) \
[1em]
Engineering, manufacturing and construction & & & & -0.335sym***\
& & & & (-3.66) \
[1em]
Agriculture, forestry, fishery and veterinary sciences & & & & 0.299sym* \
& & & & (2.09) \
[1em]
Health and welfare & & & & 2.608sym***\
& & & & (28.88) \
[1em]
Services& & & & 0.0161 \
& & & & (0.12) \
[1em]
Unknown& & & & -0.929 \
& & & & (-1.58) \
[1em]
_cons & -4.662sym***& -4.662sym***& -5.724sym***& -3.876sym***\
& (-42.78) & (-42.78) & (-46.01) & (-32.74) \
hline
(N) & 101394 & 101394 & 101394 & 36005 \
hlinehline
multicolumn5lfootnotesize textitt statistics in parentheses\
multicolumn5lfootnotesize sym* (p<0.05), sym** (p<0.01), sym*** (p<0.001)\
endlongtable
enddocument
answered 1 hour ago
leandriisleandriis
11.2k1733
11.2k1733
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
add a comment |
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
Thanks leandriis! I used the code and it worked!
– Mohamed Qamar
36 mins ago
add a comment |
Mohamed Qamar is a new contributor. Be nice, and check out our Code of Conduct.
Mohamed Qamar is a new contributor. Be nice, and check out our Code of Conduct.
Mohamed Qamar is a new contributor. Be nice, and check out our Code of Conduct.
Mohamed Qamar is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483863%2ftrying-to-turn-my-tex-file-into-regression-table-note-i-am-a-beginner%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is that your entire tex file? Because it should begin
documentclassarticlebegindocument
and endenddocument
.– Teepeemm
1 hour ago
Yes that is. This was the output from some regressions I ran on Stata. Should I just insert those lines at the beginning and end of the code?
– Mohamed Qamar
1 hour ago