This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.

Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.

priv.df<-read.csv(paste("C:/Users/oyo/Downloads/data.csv", sep=""),na.strings=c("NA"))
summary(priv.df)
                                                Name.state         oyo_id         city_name           Date             D.7            ADR        
                                                     :2069            :2069            :2069            :2069            :2069   Min.   : 25.33  
 Hotel Jackson Fairgrounds I-55, Mississippi         :  27   US_ATL003:  27   Jackson  :  84   6/29/2019:  13   6/22/2019:  13   1st Qu.: 34.58  
 OYO Hotel Decatur East I20 & Wesley Club Dr, Georgia:  27   US_JAC006:  27   Texarkana:  53   7/1/2019 :  13   6/24/2019:  13   Median : 39.90  
 OYO Hotel Texarkana Trinity AR, Texas               :  27   US_TEX001:  27   Tyler    :  43   7/13/2019:  13   6/27/2019:  13   Mean   : 47.07  
 Hotel Deming DMN Airport, New Mexico                :  26   US_DLS005:  26   Decatur  :  28   7/4/2019 :  13   6/29/2019:  13   3rd Qu.: 49.36  
 OYO Hotel Texarkana North Heights AR, Texas         :  26   US_DMG001:  26   Deming   :  26   7/6/2019 :  13   6/30/2019:  13   Max.   :507.67  
 (Other)                                             : 171   (Other)  : 171   (Other)  :  70   (Other)  : 239   (Other)  : 239   NA's   :2069    
 Cancellations     No.shows     Reviews_to_Checkout percentile_result_page_rank   page_score       price_qlty      r_oyo_score      conversion  
        :2069          :2069              :2069     Min.   : 3.00               Min.   : 51.00   Min.   :  0.00   Min.   :0.000          :2069  
 0      : 167   0      : 126   0          : 167     1st Qu.:20.00               1st Qu.: 91.00   1st Qu.:  0.00   1st Qu.:5.600   0      :  51  
 1      :  72   1      :  82   #N/A       :  63     Median :29.00               Median : 95.00   Median : 59.00   Median :6.100   16.6   :   9  
 2      :  32   2      :  30   0.5        :  18     Mean   :34.36               Mean   : 90.84   Mean   : 50.23   Mean   :6.251   #N/A   :   8  
 #N/A   :  14   #N/A   :  14   0.333333333:  17     3rd Qu.:45.00               3rd Qu.:100.00   3rd Qu.: 82.00   3rd Qu.:7.125   10     :   8  
 3      :  11   3      :  14   1          :  10     Max.   :80.00               Max.   :100.00   Max.   :100.00   Max.   :8.500   12.5   :   7  
 (Other):   8   (Other):  38   (Other)    :  29     NA's   :2069                NA's   :2069     NA's   :2069     NA's   :2069    (Other): 221  
      ctr        Impressions     Commission           state      Cancellation_perc  Noshow_perc        Rank       page_score_D.7 Cancellation_D.7
        :2069          :2069          :2069              :2069          :2069             :2069   Min.   : 6.00          :2069          :2135    
 0      :  35   0      :  34   13.00% :  18   #N/A       :   1   0.00%  : 167      0.00%  : 126   1st Qu.:13.00   #N/A   : 114   0.00%  : 113    
 3.7    :  11   #N/A   :   8   11.00% :  11   Georgia    :  28   25.00% :  17      100.00%:  27   Median :19.00   100    :  76   #N/A   :  34    
 4.1    :   9   1010   :   3   12.00% :  10   Mississippi:  83   33.33% :  15      33.33% :  20   Mean   :18.75   94     :  29   33.33% :  14    
 4.3    :   9   1041   :   3   14.00% :  10   New Mexico :  26   #N/A   :  14      50.00% :  19   3rd Qu.:24.00   91     :  19   25.00% :  13    
 #N/A   :   8   667    :   3   15.00% :   8   Texas      : 141   50.00% :  10      #N/A   :  14   Max.   :33.00   95     :  16   50.00% :  13    
 (Other): 232   (Other): 253   (Other): 247   Washington :  25   (Other):  81      (Other):  98   NA's   :2135    (Other):  50   (Other):  51    
  No.show.D.7      Rank.D.7    Review_score.D.7 Percentile_page.D.7 Price_Quality.D.7 Conversion.D.7      CC7            NS7            CO7      
        :2135          :2188          :2069            :2069               :2069             :2135          :2135          :2135          :2069  
 0.00%  :  99   #N/A   :  32   #N/A   : 109     #N/A   : 109        #N/A   : 109      #N/A   :  31   0.00%  :  70   0.00%  :  61   #N/A   :  38  
 #N/A   :  34   19     :  18   5.5    :  17     25     :  20        0      :  59      0      :  21   #N/A   :  44   #N/A   :  44   0      :  17  
 100.00%:  14   25     :  15   5.6    :  17     45     :  15        100    :  26      14.2   :   9   25.00% :  10   -33.33%:   9   -4.1   :   5  
 50.00% :  14   24     :  13   8.5    :  17     21     :  14        83     :   9      16.6   :   6   -25.00%:   8   33.33% :   9   13     :   4  
 33.33% :  13   26     :  13   7.2    :  13     18     :  12        82     :   8      10     :   5   -33.33%:   8   50.00% :   8   16.6   :   4  
 (Other):  64   (Other):  94   (Other): 131     (Other): 134        (Other):  93      (Other): 166   (Other):  98   (Other): 107   (Other): 236  
      CNS7           REV7            P7            PQ7            PER7            R7         BRNs_BCom     BRNs_Expedia    URNs_BCom     URNs_Expedia 
        :2069          :2069          :2069          :2069          :2069          :2135          :2069          :2069          :2069          :2069  
 0      :  66   #N/A   : 109   0      : 144   #N/A   : 109   #N/A   : 109   0      :  52   1      :  64   2      :  42   1      :  72   1      :  52  
 #N/A   :  44   0      :  69   #N/A   : 114   0      :  81   0      :  55   -2     :  34   2      :  46   5      :  36   2      :  57   2      :  51  
 0.00%  :  33   0.1    :  36   -3     :   6   -1     :  14   4      :  16   #N/A   :  31   3      :  39   1      :  35   0      :  52   0      :  44  
 50.00% :  15   -0.1   :  32   -5     :   6   -6     :  10   3      :  14   -1     :  29   4      :  31   3      :  32   3      :  42   3      :  38  
 33.33% :  10   0.2    :  22   2      :   6   1      :   9   -1     :  12   1      :  12   5      :  28   0      :  30   4      :  23   5      :  31  
 (Other): 136   (Other):  36   (Other):  28   (Other):  81   (Other):  98   (Other):  80   (Other):  96   (Other): 129   (Other):  58   (Other):  88  
        Revenue     Reviews       Checkouts    total_properties
            :2069       :2069          :2069   Min.   : 4.00   
 0          :  52   #N/A:  63   1      :  70   1st Qu.: 8.00   
 35         :   4   0   : 167   #N/A   :  63   Median :17.00   
 38         :   4   1   :  62   2      :  62   Mean   :15.94   
 #N/A       :   3   2   :  12   3      :  39   3rd Qu.:24.00   
 105.3333333:   3               5      :  18   Max.   :33.00   
 (Other)    : 238               (Other):  52   NA's   :2069    
model2 <- lm(as.numeric(PER7)~as.numeric(P7)+as.numeric(CO7)+as.numeric(NS7)+as.numeric(REV7)+as.numeric(PQ7), data=priv.df)
 summary(model2)

Call:
lm(formula = as.numeric(PER7) ~ as.numeric(P7) + as.numeric(CO7) + 
    as.numeric(NS7) + as.numeric(REV7) + as.numeric(PQ7), data = priv.df)

Residuals:
     Min       1Q   Median       3Q      Max 
-18.3338  -0.0934  -0.0934  -0.0934  18.1400 

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)      -0.444140   0.078827  -5.634 1.97e-08 ***
as.numeric(P7)    0.893301   0.056466  15.820  < 2e-16 ***
as.numeric(CO7)   0.029840   0.002649  11.265  < 2e-16 ***
as.numeric(NS7)  -0.045127   0.007903  -5.710 1.27e-08 ***
as.numeric(REV7)  0.614276   0.044934  13.671  < 2e-16 ***
as.numeric(PQ7)   0.045253   0.018539   2.441   0.0147 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 2.516 on 2367 degrees of freedom
Multiple R-squared:  0.7356,    Adjusted R-squared:  0.735 
F-statistic:  1317 on 5 and 2367 DF,  p-value: < 2.2e-16

Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Ctrl+Alt+I.

When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Ctrl+Shift+K to preview the HTML file).

The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.

LS0tDQp0aXRsZTogIlIgTm90ZWJvb2siDQpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sNCi0tLQ0KDQpUaGlzIGlzIGFuIFtSIE1hcmtkb3duXShodHRwOi8vcm1hcmtkb3duLnJzdHVkaW8uY29tKSBOb3RlYm9vay4gV2hlbiB5b3UgZXhlY3V0ZSBjb2RlIHdpdGhpbiB0aGUgbm90ZWJvb2ssIHRoZSByZXN1bHRzIGFwcGVhciBiZW5lYXRoIHRoZSBjb2RlLiANCg0KVHJ5IGV4ZW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