Statistical Packages

57

Solutions

152

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

Hello All Experts,
I am a student enthusiast in learning "Data Analytics" , which is the best platform to learn for FREE?
I want to Learn 'Data Science (Statistics)' & 'SAS/R' from scratch?
Any videos? Any websites? Any Blogs?

Thanks,

Regards,
Satish Kumar G N
0
Free Tool: ZipGrep
LVL 8
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 All,
While using REF keyword in my logical file , i get compilation error - "Record name same as name of file being created"

DDS of LF -

*************** Beginning of data *************************************
                                            REF(ACCOUNT)                
                R USEREF                                                
                  ACCLVL    R               REFFLD(ACCLEVELID ACCOUNT)  
                  ACCORG    R               REFFLD(ACTORGCOD  ACCOUNT)  
                  ACCNUM    R               REFFLD(ACCOUNTNUM ACCOUNT)  
****************** End of data ****************************************

May i know why is that so ?
0
Issue is that when I set a different it doesn't update neither my texblock.Text nor my listbox.Items;

Help very appreciated:)

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.Services.Maps;
using Windows.Devices.Geolocation;


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

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

     

        List<string> stringlist = new List<string>();

        public MainPage()
        {
            this.InitializeComponent();

            this.RightTapped += MainPage_RightTapped;

            mapscontrol.CenterChanged += Mapscontrol_CenterChanged;

            listbox.DoubleTapped += Listbox_DoubleTapped;

            listview.Items.Add("Zoom In");

            listview.Items.Add("Zoom Out");

            listview.Items.Add("Navigate North");

            listview.Items.Add("Navigate South");

 …
0
gnn
bhhd
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
Team, need help resolving a laptop build that's continously failing at the bitlocker stage of task sequence, it's specific to just this model laptop, and I suspect it's related to some BIOS config.
Can you advise or direct me please,
Laptop Model = HP Elite X2 1012

______________________________________________________________________________________________________________________________________________
Error in logs:

... r
Initial TPM state: 55
Creating TPM owner authorization value
Succeeded loading resource DLL 'C:\Windows\CCM\1033\TSRES.DLL'
Taking ownership of TPM
uStatus == 0, HRESULT=80070005 (e:\nts_sccm_release\sms\framework\tscore\tpm.cpp,645)
pTpm->TakeOwnership( sOwnerAuth ), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\bitlocker.cpp,522)
InitializeTpm(), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\bitlocker.cpp,1313)
ConfigureKeyProtection( keyMode, pwdMode, pszStartupKeyVolume ), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\bitlocker.cpp,1552)
pBitLocker->Enable( argInfo.keyMode, argInfo.passwordMode, argInfo.sStartupKeyVolume, argInfo.bWait ), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\main.cpp,382)
'TakeOwnership' failed (2147942405)
Failed to take ownership of TPM. Ensure that Active Directory permissions are properly configured
ccess is denied. (Error: 80070005; Source: Windows)
0
write.csv(df,file="~C:/Users/anitha/Documents/social_media analysis/socialmedia/tweets.csv",row.names=FALSE,append = TRUE)
Error in file(file, ifelse(append, "a", "w")) :
  cannot open the connection
0
Hi Do you know where I can install MS R MS SQL Server 2016?
I assume it is free. Am I right?
0
[Webinar] How Hackers Steal Your Credentials
LVL 8
[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Its supposed to be a map guider an accurate gps for car by giving the accurate route through roads car must do.

underlined line is what debug shows it as wrong.

any other

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 App75
{
    /// <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.Tapped += Button_Tapped;
        }

        private async void Button_Tapped(object sender, TappedRoutedEventArgs e)
        {
            BasicGeoposition b1 = new BasicGeoposition();

            b1.Latitude = Convert.ToDouble(startpositionlatitude.Text);

            b1.Longitude = Convert.ToDouble(startpositionlongitude.Text);

            BasicGeoposition b2 = new BasicGeoposition();
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
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
Hi,

I fairly new in R, I am doing some simple visualization in shiny app, I am trying to flip a bar chart downward using  scale_y_reverse() , it works well when I run my code in R console, but when I run it in shiny it does not flip the bar chart, below is my code in the server part:

output$trendbarPlot <- renderPlotly({
                              mydat <- mydatCopy %>% filter(Country ==input$Country)
                              

attacksbarplot = ggplot(data=mydat,aes(x=as.factor(Year))) + geom_bar() + theme_bw(base_size=35) + xlab("") + ylab("") + theme(axis.text.x = element_blank(), axis.ticks=element_blank(),panel.grid.major=element_blank(),panel.grid.minor=element_blank(),panel.border=element_blank())  + scale_y_reverse()


attacksbarplotnol = ggplot(data=mydat,aes(x=as.factor(Year))) + geom_bar() + theme_bw(base_size=15) + xlab("") + ylab("") + theme(axis.text.x = element_blank(), axis.text.y = element_blank(), axis.ticks=element_blank(),panel.grid.major=element_blank(),panel.grid.minor=element_blank(),panel.border=element_blank()) +  scale_y_reverse()
 
                              })

attached file has the required flipped bar chart in shiny.

Does anyone knows how can I solve this issue?
FlippedChart.png
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
Enroll in June's Course of the Month
LVL 8
Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

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
Hi,
 We have a common situation where we want to browse through a folder container 'n' number of files and execute a package created for each file so we can import each of the file into a corresponding table in our sql server db. The packages are all included in the project.

'For each' of these files in the folder, a script task identifies the package full path and sets it to a variable which I then try to set it to 'connection' on the expression of the package. Question is what should I be setting in expression, 'Connection' to full path of the pacakge or just 'PackageName' (to the package Name alone)?

When I try to set PacakgeName in the expression  - using project reference, the designer complains that "Failed to locate the specified package in the project".  We tried both "project reference and external reference" file system to no avail.

Should I be using Project Reference at all? Or Should I use external Reference and then file system which also doesn't seem to work? We are not deploying the packages to anywhere else right now.

Nothing seems to be changing the execution at run time. What is the right way to do this? What exactly should go in the expression to switch the packages dynamically?

Thank you.
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
My data:

Gage_number Latitude    Longitude   Date    Gage_1  Gage_2  Gage_3

1   35.02   -80.84  1/1/2002    0.23    0   0.7
2   35.03   -81.04  1/2/2002    0   0   0.2
3   35.06   -80.81  1/3/2002    3.2 2.1 0.1
This is just a subset of data. I around 50 gauge stations. I want to find spatial auto correction between my gauge stations for rain fall. Based on distance between them. I have created my distance matrix. But I don’t want to use any library in R. I want to do all steps in a function.

loc <- read.table("rain_data.txt",header=TRUE,fill=TRUE)  
gauge.dists <- as.matrix(dist(cbind(loc$Latitude, loc$Latitude))) #distance matrix
Now since distance between gauges is not uniform. I want to use a certain bin size to decide about distance lags.

Pseudocode:

If the distance between guage pair 1-2 is 1 meter then assign a distance lag of 1 and so on So Lag 1=intergage dist=1 meter. So Lag 5=intergage dist=5 meter After creating that matrix I will find autocorrelation between gauge pairs.

so for lag 1 intergage dist=1 for lag 5 intergage dist=5

Gage pair   date    RainA   RainB       Gage pair   date    RainA   RainB

1-2 1/1/2002    0.23    0       1-3 1/1/2002    0.23    0.7
1-2 1/2/2002    0   0       1-3 1/2/2002    0   0.2
1-2 1/3/2002    3.2 2.1     1-3 1/3/2002    3.2 0.1
I have a hard time translating it into loop or a function. Any ideas?
0
I am bit new to R so I am not sure if this is possible or if its more difficult than I am assuming.

Objective: I want to find the correlation between Diagnosis codes. If patient #1 has condition X what the likelihood he will at some point also have condition Y as well.

Here is what I have:
136,337 Unique patient IDs (74,527 Female, 61,810 Male)
34,442 Unique Diagnosis that exists in my population
7,777,728 Unique observations

So my 2 questions are:
1. How should I layout my Table for R?
Right now I have the table columns as :
ID, SEX, Diagnosis

2. What should my Rscript look like in order to create correlation coefficients between all my diagnosis codes.  

FYI: Yes I also have a time stamp per diagnosis code but adding it now would be to adding more confusion to the confusion I already have.
0

Statistical Packages

57

Solutions

152

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
>