mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Added .do sample for Stata.
Source: http://www.stata.com/help.cgi?regress
This commit is contained in:
		
							
								
								
									
										18
									
								
								samples/Stata/regress_example.do
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								samples/Stata/regress_example.do
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | * Setup | ||||||
|  | sysuse auto | ||||||
|  |  | ||||||
|  | * Fit a linear regression | ||||||
|  | regress mpg weight foreign | ||||||
|  |  | ||||||
|  | * Fit a better linear regression, from a physics standpoint | ||||||
|  | gen gp100m = 100/mpg | ||||||
|  | regress gp100m weight foreign | ||||||
|  |  | ||||||
|  | * Obtain beta coefficients without refitting model | ||||||
|  | regress, beta | ||||||
|  |  | ||||||
|  | * Suppress intercept term | ||||||
|  | regress weight length, noconstant | ||||||
|  |  | ||||||
|  | * Model already has constant | ||||||
|  | regress weight length bn.foreign, hascons | ||||||
		Reference in New Issue
	
	Block a user