Statistical Packages

61

Solutions

158

Contributors

Statistical packages are software titles, such as JMP and GNU Octave, and programming languages, such as MATLAB, R and SAS, that are used to discover, explore and analyze data and suggest useful conclusions, either to learn something unexpected or to confirm a hypothesis. The field includes the design and analysis of techniques to give approximate but accurate solutions to hard problems in statistics, econometrics, time-series, optimization and 2D- and 3D-visualization. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, in different business, science, and social science domains.

Share tech news, updates, or what's on your mind.

Sign up to Post

These are the codes that are currently working in pulling up the data.
Me.ADDRESS.Value = Sheet1.Range("Ax" & r).Value
Me.ADDRESS.Value = Sheet1.Range("Aw" & r).Value
Me.REMARKS.Value = Sheet1.Range("AY" & r).Value
Me.Image1.Picture = LoadPicture(Worksheets("Sheet1").Range("AZ" & r))  'Where r is the row number

Now I am using these codes to update the file.
Sheet1.Range("AV" & r).Value = Me.RELATION.Value
Sheet1.Range("AW" & r).Value = Me.MOBILE1.Value
Sheet1.Range("AX" & r).Value = Me.ADDRESS.Value
Sheet1.Range("AY" & r).Value = Me.REMARKS.Value
(Need code for the update of picture here....)
I tried these code to update the picture but it won't work.
Worksheets("Sheet1").Range("AZ" & r).picture=me.loadpicture.image1
I already tried to invert but still its not working.
0
Free Tool: IP Lookup
LVL 9
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Private Sub TextBox1_Change()
Find = Val(Me.TextBox1.Value)
c = Application.WorksheetFunction.CountIf(Sheet1.Range("B:B"), Find)
If c = 0 Then
EMPNO.Text = ""
r = Application.WorksheetFunction.Match(Find, Sheet1.Range("B:B"), 0)
Me.EMPNO.Value = Sheet1.Range("B" & r).Value
Me.QIDNO.Value = Sheet1.Range("C" & r).Value
Me.LNAME.Value = Sheet1.Range("D" & r).Value
Me.FNAME.Value = Sheet1.Range("E" & r).Value
Me.Image1.Picture = LoadPicture(Worksheets("Sheet1").Range("AZ" & r)
These are the codes that ive been using to pull up the data from sheets1 to userform1.I just wanna ask if how can I also delete the displayed data in my userform,that corresponds to data in excel sheeT?

Hope you can provide me the best answer.I really appreciate those who can.
0
I have what I thought was a well prepared dataset.  I wanted to use the Apriori Algorithm in R to look for associations and come up with some rules.  I have about 16,000 rows (unique customers) and 179 columns that represent various items/categories.  The data looks like this:

Cat1  Cat2  Cat3  Cat4  Cat5 ... Cat179
1,        0,       0,        0,      1,     ...  0
0,        0,       0,        0,      0,     ...  1
0,        1,       1,        0,      0,     ...  0
...

I thought having a comma separated file with binary values (1/0) for each customer and category would do the trick, but after I read in the data using:

>data5 = read.csv("Z:/CUST_DM/data_test.txt",header = TRUE,sep=",")

and then run this command:

> rules = apriori(data5, parameter = list(supp = .001,conf = 0.8))

I get this error:

Error in asMethod(object):
column(s) 1, 2, 3, ...178 not logical or a factor. Discretize the columns first.  

I understand Discretize but not in this context I guess.  Everything is a 1 or 0.  I've even changed it from INT to CHAR and received the same error.  I also had the customer ID (unique) in column 1 but I understand that isn't necessary when the data is in this form (flat file). I'm sure there is something obvious I'm missing - I'm new to R.

What am I missing?  Thanks for your input.
0
Hi Experts,

 I am looking  for a data science project(using python) with complete source code and documentation , please help me with the same and will appreciate your help in this regard.  

Thanks,
SRK,
0
I need some advice in writing below query: I used to have joins before in the below query. I am re-writing that query using CTE. But i am not getting expected results. Query is:

WITH PERS_ADDRESS
     AS (SELECT PERS_ID,
                ZIP_CODE_NUM,
                ROUTER_CALL_DAY_IDENTIF,
                ROUTER_CALL_IDENTIF,
                created_on,
                LANG_CODE
           FROM (  SELECT PA.PERS_ID,
                          ZIP_CODE_NUM,
                          CL.ROUTER_CALL_DAY_IDENTIF,
                          CL.ROUTER_CALL_IDENTIF,
                          cl.created_on,
                          CL.LANG_CODE,
                          ROW_NUMBER ()
                             OVER (PARTITION BY PA.PERS_ID ORDER BY END_DATE)
                             AS R
                     FROM call_log@ATLG03 CL
                          LEFT JOIN PERS_ADDR@ATLG03 PA
                             ON PA.PERS_ID = CL.PERS_ID
                          LEFT JOIN ADDR@ATLG03 AD ON AD.ID = PA.ADDR_ID
                    WHERE     PA.END_DATE > SYSDATE
                          AND (    CL.ROUTER_CALL_DAY_IDENTIF IS NOT NULL
                               AND CL.ROUTER_CALL_IDENTIF IS NOT NULL)
                          AND cl.created_on >=
                                 TO_DATE ('03/16/2017', 'mm/dd/yyyy')
                          AND cl.created_on <
                                 TO_DATE ('03/17/2017', 'mm/dd/yyyy') + 1
                          AND

Open in new window

0
Hi Do you know where I can install MS R MS SQL Server 2016?
I assume it is free. Am I right?
0
Hey its supposed to load pdf from a IRandomAcessStream;


but no work says "invalid parameter" on underlined and bold line;

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Storage;
using Windows.Data.Pdf;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App73
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            button_Get.Tapped += Button_Get_Tapped;
        }

        private async void Button_Get_Tapped(object sender, TappedRoutedEventArgs e)
        {
            MemoryStream mem = new MemoryStream(File.ReadAllBytes(@filename.Text));

            Windows.Storage.Streams.IRandomAccessStream r = mem as Windows.Storage.Streams.IRandomAccessStream;

          [b]  PdfDocument dc = await PdfDocument.LoadFromStreamAsync(r);

[/b]
         

           

           
0
My procedure is passed a comma-separated list of IDs, for example 7369,7499,7839,7902. I tried to use it in my code like this:

declare
   p_empno_list constant varchar2(20) := '7369,7499,7839,7902';
begin
   for r in (
      select * from emp
      where  empno in (p_empno_list)
   )
   loop
      dbms_output.put_line(rpad(r.empno,9) || r.ename);
   end loop;
end;
/
but it just gives me an error:1 When SQL is expecting a character string such as SMITH, but is passed a comma-separated list such as SMITH,JONES,FORD,MILLER, no error is produced, but the query simply returns no rows.

ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at line 4

How can i convert CSV to list so that it can be accepted in IN- clause?
0
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Storage;
using Windows.Data.Pdf;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App73
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            button_Get.Tapped += Button_Get_Tapped;
        }

        private async void Button_Get_Tapped(object sender, TappedRoutedEventArgs e)
        {
            MemoryStream mem = new MemoryStream(File.ReadAllBytes(@filename.Text));

            Windows.Storage.Streams.IRandomAccessStream r = mem as Windows.Storage.Streams.IRandomAccessStream;

            PdfDocument dc = await PdfDocument.LoadFromStreamAsync(r);



         
           


        }
    }
}
it doesn't debug .don't know why???
0
Hello, needing some help here.

Cell Sheet5 B13 and C13 has values that represent temperature and dewpoint in Fahrenheit.  I need to convert each value into Celsius, the formala is 5/9*(Temp-32).  Then for the first value I need to use this formula 6.11*10.0**(7.5*Tc/(237.7+Tc)), where Tc is the value.  Then for the second value I need 6.11*10.0**(7.5*Tdc/(237.7+Tdc)), where Tdc is the second value.  Finally I need to divide the number from the second equation by the number in the first equation and times it by 100.

Finally, I need to computer =16.923+(Temp*1.85212*(10^-1))+(5.37941*RH)-((Temp*RH)*1.00254*(10^-1))+((Temp^2)*9.41695*(10^-3))+((RH^2)*7.28898*(10^-3))+((Temp^2)*RH*3.45372*(10^-4))-(Temp*(RH^2)*8.14971*(10^-4))+((RH^2)*(Temp^2)*1.02102*(10^-5))-((Temp^3)*3.8646*(10^-5))+((RH^3)*2.91583*(10^-5))+(RH*(Temp^3)*1.42721*(10^-6))+((RH^3)*Temp*1.97483*(10^-7))-((RH^2)*(Temp^3)*2.18429*(10^-8))+((RH^3)*(Temp^2)*8.43296*(10^-10))-((RH^3)*(Temp^3)*4.81975*(10^-11)).  Temperature is the original Fahrenheit value and RH is what we calculated above.


Trying to shoot for some type of function as I will need to use this to calculate multiple cells.  Thanks in advance for you help.
0
Get HTML5 Certified
LVL 9
Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

well it is supposed to be a map guide:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Geolocation;
using Windows.Services.Maps;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App50
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            _map.Tapped += _map_Tapped;
        }

        private void _map_Tapped(object sender, TappedRoutedEventArgs e)
        {
            BasicGeoposition b = new BasicGeoposition();

            b.Latitude = Convert.ToSingle(_latitude.Text);

            b.Longitude = Convert.ToSingle(_longitude.Text);

            Geopoint p = new Geopoint(b);

            MapLocationFinderResult r = MapLocationFinder.FindLocationsAtAsync(p).GetResults();

            foreach(var vari in r.Locations)
            {

                _result.Text = …
0
On linux I have an arbitrarily sized file file of k lines (say 500,000 lines) and I want to randomly delete  lines in the file until I have r (say 10,000) lines remaining.  How can I do this with a Linux shell?

Basically, I have a data set and I want to reduce it to a more manageable sample.

Thanks,
Chris
0
Hi,
I am wondering what program could be used for the attached project.
I'm wanting to find what variable weightings produce the maximum profit.
Is this a form of regression and if so which one ?
Please manually input values into cell range M2:S2 and notice how it affects P/L cell (Yellow)

Many thanks for any advice you may have

Ian
Regression-Weightings.xlsx
0
Hi,
I have a spreadsheet where a User keeps track of numbered Jobs.
The current Userform can be updated with more information as Jobs progress.

Is there any way to write back the data in a different font or colour ?
We want to use "strikeout" font on cancelled Jobs (rather than have a new field in the spreadsheet).
I will put a "cancelled Job" button on the Userform for this purpose (with all the appropriate controls).

Example of current code to write back data is:

r = worksheetfunction.match(Val(JobBox), Ws.columns(1), 0)
currentrow = r
Me.firstnamebox = ws.cells(r, "b")
Me.lastnamebox = ws.cells(r, "c")
Me.Phonebox = ws.cells(r, "d")
Me.AgeBox = ws.cells(r, "e")
....etc,etc

cheers (P.S. Have not done this forum stuff for a zillion years so a bit out of date )
0
So I'm trying to put together a website to display analytics that are output from R Studio.  I'd like to keep the same masterpage and basic site design that we have on our other company sites which are all ASP.Net...   Any ideas on how I can programmatically accomplish this, these reports will be generated daily.  I know this is a broad question but all of my searches have left me unsure how to accomplish this.  Deadlines Friday, so...  =D  Even a basic direction at this point would be greatly appreciated.  I basically want to have the HTML page hosted within my ASP Masterpage as if they were one page.  Any ideas?
0
Guys,I am trying to get this piece of code working but I know its wrong but cant think how to fix it

What I want it to do is look at the cell in column D and compare the result of the formula which is a look up and if they match then to not colour the cell but if they don't then I want it to colour the cell.

Sub LoopFormula()

On Error GoTo myError

LastRow = Cells(Rows.Count, "A").End(xlUp).Row

For r = 3 To LastRow

If (Sheet2.Cells(r, "D")) = "=IF(D3=VLOOKUP(D3,Project!$A$2:$A$3000,1),VLOOKUP(D3,Project!$A$2:$A$3000,1))" Then Sheet2.Cells(r, "D").Interior.ColorIndex = xlNone
If (Sheet2.Cells(r, "D")) <> "=IF(D3=VLOOKUP(D3,Project!$A$2:$A$3000,1),VLOOKUP(D3,Project!$A$2:$A$3000,1))" Then Sheet2.Cells(r, "D").Interior.ColorIndex = 3

Next

Exit Sub
myError:

MsgBox ("Error"), , "Error"

End Sub


Any help
0
Hi All,
Would you recommend a website(s) where it will show me the condensed basics of college level statistics in laymen’s terms – so that quickly I can understand the core and key concepts? and apply those conceptas in real life  
Thank you
0
Hey all,
I am trying to get my feet wet in R programming for statistical analysis. '

Can anyone of you, tell me what is the basic differences and similarities between a list and vector, in a simple  layman’s terms…
What is a  data frames?

Thank you
0
Before doing a linear regression on a data-set one needs to find out a few things about the data:

  • is there is a linear relation between the dependent and independent variables
  • are the variables normally distributed (if not, do a Data Transformation)

Questions:

  1. Book1.xlsx
  2. In Excel, do I simply use the CORREL() function to determine a linear relation between the dependent and independent variables?
  3. How do I interpret these results (i.e. low value = low correlation, high value = high correlation)?
  4. To test normality, can I simply use the QQ Plot test or should I use other tests, like the K-S Test as well?
  5. How do I interpret the K-S Test results?
  6. How do I go about doing a "Data Transformation" and how do I know whether I should do it?
  7. Please do not confuse things with only Statistics talk when giving an answer because I might not understand what you're saying. I've uploaded a sample of a data-set.

Thank you!
0
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Thanks in advance to all. ( I am a novice VBA user)

I trying to right a script that will import appointments in into Outlook 2016 from excel 2016. I have add some lines to the follow, but still no Joy.

What I would like to do is use the headings ,  to import, update the group calendar.

Subject      Categories            Location                        Start Date      Start Time      End Date      End Time      Description      Required Attendees      Show Time As      Reminder Set      Remind Beforehand      



Sub RegisterAppointmentList()
    ‘ adds a list of appontments to the Calendar in Outlook
    Dim olApp As Outlook.Application
    Dim olAppItem As Outlook.AppointmentItem
    Dim r As Long
   
    On Error Resume Next
    Worksheets("Schedule").Activate

    Set olApp = GetObject("", "Outlook.Application")
    On Error GoTo 0
    If olApp Is Nothing Then
        On Error Resume Next
        Set olApp = CreateObject("Outlook.Application")
        On Error GoTo 0
        If olApp Is Nothing Then
            MsgBox "Outlook is not available!"
            Exit Sub
        End If
    End If
    r = 6 ‘ first row with appointment data in the active worksheet
    Dim mysub, myStart, myEnd
    While Len(Cells(r, 2).Text) <> 0
        mysub = Cells(r, 2) & ", " & Cells(r, 3)
        myStart = DateValue(Cells(r, 5).Value) + Cells(r, 6).Value
        myEnd = DateValue(Cells(r, 5).Value) + Cells(r, 7).Value
        ‘DeleteTestAppointments mysub, myStart, myEnd
        Set olAppItem = …
0
Need email sent automatically when date is entered in any independent cell in column E3:E45.

Option Explicit

Sub email()

 Dim r As Range
    Dim cell As Range

    Set r = Range("E3:E45")

    For Each cell In r

        If cell.Value = Date Then

            Dim Email_Subject, Email_Send_From, Email_Send_To, _
            Email_Cc, Email_Bcc, Email_Body As String
            Dim Mail_Object, Mail_Single As Variant

            Email_Subject = "Trucks Due for B Service"
            Email_Send_From = ".com"
            Email_Send_To = ".com"
            Email_Cc = ""
            Email_Bcc = ""
            Email_Body = "body"

            On Error GoTo debugs
            Set Mail_Object = CreateObject("Outlook.Application")
            Set Mail_Single = Mail_Object.CreateItem(0)
            With Mail_Single
            .Subject = Email_Subject
            .To = Email_Send_To
            .cc = Email_Cc
            .BCC = Email_Bcc
            .Body = Email_Body
            .send
            End With

        End If

    Next


    Exit Sub

debugs:
        If Err.Description <> "" Then MsgBox Err.Description
End Sub

Open in new window

(Edit: Added CODE tags)
Nestle-Water-B-Service-Master-Testi.xlsm
0
I am trying to execute external script in SQL server 2016. For that the following script executed

sp_configure 'external scripts enabled', 1;
GO
reconfigure;
GO

Then I restarted the service.

However, after executing following script run_value is still 0

code trying to run is..

EXEC sp_execute_external_script
      @language = N'R'
     ,@script = N'      res <-quantile(InputDataSet$Ages);
                  print(res)'
     ,@input_data_1 = N'SELECT Ages = DATEDIFF(YEAR,[BirthDate],GETDATE())
                        FROM [AdventureWorksDW2016CTP3].[dbo].[DimCustomer];'
;

Please help!
0
Greetings,
I have a situation where the data in my database is to be analysed and results are to be published on the web page, i built a web-form through which required data can be selected by the user, now this data should be send to R for some  analysis and results are needed to be published back on the  webpage,i have no idea how this can be done, i built the web app in PHP, with MySQL as database, any help will be appreciated,thanks in advance.
0
I need an assist with a programming logic math question.
Here is a simple array of 8 rows &  8 cols.   True/false 1/0

I need to find the group of 8 RnCn's which are all 0's, but do not share the same R or C , i.e. no horizontal or vertical duplicates.

I had to figure this out manually.  There are 2 groups left, then the array will be all 1s.

1st remaining group is:     R1C7   R2C4   R3C3  R4C6  R5C5  R6C2  R7C1  R8C8
2nd remaining group is:    R1C8   R2C2   R3C6  R4C4  R5C3  R6C1  R7C7  R8C5

The QUESTION is:  Can you share with me how to program code (such as VBA or VS)  to find these 2 groups ??

  1  1  1  1  1  1  0  0 
  1  0  1  0  1  1  1  1 
  1  1  0  1  1  0  1  1 
  1  1  1  0  1  0  1  1 
  1  1  0  1  0  1  1  1 
  0  0  1  1  1  1  1  1 
  0  1  1  1  1  1  0  1 
  1  1  1  1  0  1  1  0 

Open in new window

Such as:
Dim MyGroupByRow(8)  = 0 
For r = 1 to 8
    For c = 1 to 8  
        If RowCol(r,c) = 0   And   MyGroupByRow(r)  = 0  Then 
            ' 1st col found in row = 1 is c = 7.     r2 will be=2  r3=3, r4=4, r5=5, r6=1, r7=?
            MyGroupRow(r) = c
            Exit For   ' We're done with this row, exit this For c = loop and go to next r.
        End If
    Next
Next

Open in new window

The problem starts at r = 7 because I can't find a still available column which is 0 and not already taken in MyGroupRow().
You just can't the 1st column with a 0 in each row.  
How do I program some sort of deeper iteration code logic to find the right group?
0
Five hands (Five cards per hand) are dealt from a standard 52-card deck of cards.

What is the probability that the Queen of Heart will appear at least three times?

Note: After each dealing the entire deck (52 cards) are reshuffled.
0

Statistical Packages

61

Solutions

158

Contributors

Statistical packages are software titles, such as JMP and GNU Octave, and programming languages, such as MATLAB, R and SAS, that are used to discover, explore and analyze data and suggest useful conclusions, either to learn something unexpected or to confirm a hypothesis. The field includes the design and analysis of techniques to give approximate but accurate solutions to hard problems in statistics, econometrics, time-series, optimization and 2D- and 3D-visualization. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, in different business, science, and social science domains.

Top Experts In
Statistical Packages
<
Monthly
>