Statistical Packages

161

Solutions

337

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.

I have a variation on a similar question I posted last week. How can I join these two queries together to produce the output as shown in the attached spreadsheet

select p.Project_Code --THIS CODE CORRECTLY RETURNS PROJECT DETAILS
, p.Name as 'Project Name'
, s.name as 'Project Status'
, r.Name as 'Division Name'
from Project p
left join Project_Status s on p.Project_Status_ID = s.Project_Status_ID
left join region r on p.Region_ID = r.Region_ID
where p.project_code in (1563)

--I NEED TO JOIN ABOVE RESULT WITH BELOW RESULT

select   --count(*) DocCnt  THIS CODE CORRECTLY GETS THE NUMBER OF DOCUMENTS
p.Project_Code, p.name as 'Project Name'/*, s.name as 'Project Status' */
--, de.entity_identifier
--, p.project_id
--,title
--, d.Document_ID
--, coalesce(convert(varchar(12),d.published_date,3),'') 'Pub Date'
--, coalesce(convert(varchar(12),d.modified_date,3),'') 'Mod Date'

from document d
join Document_Entities de on d.Document_ID = de.Document_ID
join entity_class EC on de.Entity_Class_ID = ec.Entity_Class_ID and ec.Entity_Class_ID = 3
join Project p on p.Project_ID = de.Entity_Identifier
join Project_Status s on p.Project_Status_ID = s.Project_Status_ID
where p.project_code in (1563)
Book1.xlsx
0
After several problems to install SQL Server 2016 by one of our developers, I got involved to try and assist.  Too much to go into here but it seems they had apparently installed/de-installed/re-installed SQL Server several times before involving me.  

Based on what they said they wanted installed, we were able to successfully install SQL Server 2016 except we got an error for R services saying the user "MSSQLSERVER01" user already existed.  

I'm not a SQL server expert by far so I'm not entirely sure if this "error" means the R installation failed completely or if it simply wasn't able to create the user and so just continued on with the other steps it would have done.

In looking around, I see there are 20 MSSQLSERVERxx  users in the Local Users Group (MSSQLSERVER01-MSSQLSERVER20).

I have some questions:
1.  Am I correct in assuming that this may be because of the multiple installation attempts?   And that it's likely the last installation done may be using the MSSQLSERVER20 user instead of "01"?

2. How can can I know which MSSQLSERVERxx user is being used by R Service?

3. Can I uninstall the R-Services, delete the MSSQLSERVERxx users and install R-Services again?

4. Should I just uninstall SQL Server and do the clean up of the MSSQLSERVERxx users and try the install again.

This database is to used for the BizTalk Microsoft product and at this point we aren't sure if R Services is required.  The developer is looking into that for me at this …
0
Dim xlApp As Object
Dim xlBook As Object
Dim xlSheet As Object
Dim xlRange As Object
Dim cell As Object
Dim val As Variant
Dim adrs As String
 
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(sFile)
 
       Set xlSheet = xlBook.Sheets(5)
        xlApp.Visible = True
        Set rsCurr = CurrentDb.QueryDefs("qtblDebitBranchsReportingReport").OpenRecordset
        xlSheet.Range("B12").CopyFromRecordset rsCurr
        xlSheet.Range("A7").CopyFromRecordset rsCurr
 
        Dim R As Long, ColorValue As Long


            For R = 2 To xlSheet.Application.cells(xlBook.Sheets(5).Rows.Count, "C").End(xlUp).Row

                If xlSheet.Application.cells(R, "C").Value Like "*something*" Or xlSheet.Application.cells(R, "C").Value Like "*something2*" Then
                    xlBook.Sheets(5).Rows(R).Interior.Color = 1763209
                End If
            Next
0
Any idea how the follow result is calculated :

Testlabels3           = ['Red', 'Green', 'Green', 'Red', 'Yellow']
PredictedLabels3 = ['Red', 'Red', 'Green', 'Yellow', 'Yellow']

precision_score(TestLabels3, PredictedLabels3, average=None)
result : array([1. , 0.5, 0.5])

precision_score(TestLabels3, PredictedLabels3, average='weighted')
result : 0.7
0
In excel vba I need to have my set range change negatives to positive numbers and negatives to positive.
I can not seem to get it to fire.

Here what I am have been trying:

Private Sub Worksheet_Change(ByVal target As Range)
   
    'On Error Resume Next
         
    If Not Intersect(target, Range("H3:H13")) Is Nothing Then
        Set rng = Intersect(target, Range("H3:H13"))
        For Each r In rng

        Me.Unprotect
       
        Application.EnableEvents = False
       
        target.Value = target.Value / 100
       
     Next r
       
    End If
       
           
    If Not Intersect(target, Range("R3:R13")) Is Nothing Then
      Set rng = Intersect(target, Range("R3:R13"))
        For Each cell In rng
      'Me.Unprotect
     
      'For Each c In target.Cells
          cell.Value = -cell.Value
          cell.NumberFormat = "_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)"
      Next cell
           
      End If
     
           
      Application.EnableEvents = True
     
    'Me.Protect
   
End Sub
0
We have a web application in PHP (LAMP)  which works pretty well.

We sell this app to companies directly. It is no for general use. So every time we sell it we installed in an AWS instance and provide the IP address and credentials to the customer.

This app is designed to work with a browser.

If I would like to convert this app to another languaje, like Go, which languaje would you reccomend that?

Thanks

Luis R
0
I have 2 of Dell Server PowerEdge R 510.
Both have got Windows 2019 Server as the OS right now.
I have a SAN (Storage Area Network) which is Dell PowerVault MD 3200 (12@ SAS 600GB).
I installed the “MDSM” (management software Dell Modular Disk Storage Manager at each of R 510); accordingly, from both of the R 510, I can see the MD 3200.

The Goal: I want to create some virtual machines at both R 510 which get the storage from MD 3200.

Note: I do have a little knowledge of Dell Server and no experience in VM machines; I have recently worked with Dell servers; This forum has helped me a lot; something like, it is big challenges in installing Win Server 2019 at R 510 which is INSTALLED now at both R 510, ETC.

Question: How to configure the SAN so it can be linked to VM machines at R 510?

tjie
0
How to modify the following query to add a total column of TaskSelected?

TRANSFORM COUNT(T.TaskSelected)
SELECT R.TAID, T.TaskSelected
FROM RBWS R
LEFT JOIN TaskSelected T  ON R.TaskSelectedID=T.ID
GROUP BY R.TAID
PIVOT T.TaskSelected
0
Hi All,

Please advise on the best way in a module to select query from a MSSQL db.
I have enabled ODBC etc... in PHP settings.
Have setup the DSN.
Not having much joy at all. Can query MySQL DB's of course .. but do not think I can get MSSQL to work.
Possibly I am missing an extension.

Do not want to post any code as I have tried all sorts.
I am happy with the Select.. just need to get the MSSQL connection right.

Would like to see an example I can drop into my custom extension within a module.

PHP 7.3.9
Joomla 3.9.12
Plesk 17.8.11
OS: Windows 2016.

Many thanks in advance

R
0
Hi,

Server#1(Dell R510): it is at 135 subnet
Server#2 (Dell R 510): it is at 135 subnet
The SAN (Dell MD 3200): it is at 135 subnet

Server#1, server#2 and MD 3200 are located  in the data center (Colo).

From Office (It is at different location with Colo), I can do the followings:
I can RDP to Server#1 (which from it, I can see “all network drives”),
I can install the Management software for the SAN (=Management Software Dell Modular Disk Storage Manager “MDSM”) at Server#1 remotely, then when I launch the MDSM, I can see the SAN (MD3200)

But from Server#2, I cannot see or connect to "any network drives"

Question: Why i can not see any network drives from Server#2?

tjie
0
Hi,

I have SAN Dell MD 3200:
+ We can access it through IP address
+ I have management cable which can access this SAN
+ This SAN will be used for Dell R 510 servers.

I have never experienced dealing with the SAN.

Question: Why do we need to know ADMIN PASSWORD of this MD 3200?

Thanks,
tjie
0
I am trying to learn R programming and I do not see how the following command

M = matrix( c(2,6,5,1,10,4), nrow = 2,ncol = 3,byrow = TRUE)
v = M %*% t(M)
print(v)

Open in new window


gives this output
     [,1] [,2]
[1,]   65   82
[2,]   82  117

Open in new window


when i do
 print(M)
print(t(M))

Open in new window


i see
     [,1] [,2] [,3]
[1,]    2    6    5
[2,]    1   10    4
     [,1] [,2]
[1,]    2    1
[2,]    6   10
[3,]    5    4

Open in new window


but i am not seeing how that results in
     [,1] [,2]
[1,]   65   82
[2,]   82  117

Open in new window

0
When I try to install grobi by install.packages, it fails with the attached warning. I tried R-Studio version 3.4.2 and other. However, it shows the same error message like it says "package 'gurobi' is not available (for R version 3.4.2).   It's appreciate if I can know how to install 'gurobi'.
gurobi_not_available.JPG
0
Text file to excel.
I have two set of txt file and I can import to a sheet of excel.(sheet name: R, S) But I want to import to one sheet using VBA.
Also, I want to delete duplicate value(name column) from each set of data(ex, lee from sheet R, kim and lee from sheet S)
Is it possible ?

Thank you.
0
Hi,

Finally, My Dell Power Edge R 510 is running Windows Server 2019 (actually, it is a straight forward installation).

Now, I want to install VM machines in this server.

As Dell Server, my experience in VM machine is also limited.
Can somebody direct me what would I do to create the Hyper V server 2019?

Thanks,
tjie
0
If I clock the speed of an object for six different trials is their a way to predict what the approximate mean and standard would be for 100 trials for the same distance?

Also is my sample of six trials too small?

Example
Trial 1:  .607 seconds
Trial 2:  .653 seconds
Trial 3:  .618 seconds
Trial 4:  .809 seconds
Trial 5:  .63 seconds
Trial 6:  .619 seconds

Mean is 6
Standard deviation is .076562
0
I've below code to SelectFolderDialog in my previous vb.net application. I'm trying to implement it to c# but didn't succeeded.

Can anyone help me to convert it to C# or any additional solution would be grateful.

Public Class SelectFolderDialog
    Implements IDisposable

    ' Wrapped dialog
    Private OFD As System.Windows.Forms.OpenFileDialog = Nothing

    ''' <summary>
    ''' Initialize our Open File Dialog object
    ''' </summary>
    Public Sub New()
        OFD = New System.Windows.Forms.OpenFileDialog()

        With OFD
            .Filter = "Folders|" & vbLf
            .AddExtension = False
            .CheckFileExists = False
            .DereferenceLinks = True
            .Multiselect = False
        End With
    End Sub

#Region "Properties"

    ''' <summary>
    ''' Gets/Sets the initial folder to be selected. A value of Nothing or Emplty selects the current directory.
    ''' </summary>
    Public Property InitialDirectory() As String
        Get
            Return OFD.InitialDirectory
        End Get
        Set(value As String)
            OFD.InitialDirectory = CType(IIf(value Is Nothing OrElse value.Length = 0, Environment.CurrentDirectory, value), String)
        End Set
    End Property

    ''' <summary>
    ''' Gets/Sets the title to show in the dialog. A value of Nothing or Empty defaults to 'Select a folder'
    ''' </summary>
    Public Property Title() As String
        Get
            Return OFD.Title
        End Get
        

Open in new window

0
Starting with a string representing a range:
string sortRange = "C10:H24";

Open in new window

This then works:
worksheet.Range[sortRange].Sort(worksheet.Range[sortRange].Columns[1], xlSortOder.xlDescending);

Open in new window

I saw worksheet.Range[sortRange] was listed twice, so I decided to refactor that out:
Excel.Range r = worksheet.Range[sortRange];
Excel.Range c = r.Columns[1];
r.Sort(c, xlSortOrder.xlDescending);

Open in new window

My refactored version gives a much different result. Why is that?
1
I thought I knew how to do this after my last post, but apparently not.  I have the following code which works fine, however, the output needs to list groups from the profile table that have no entries at all.  So, when I run the code currently, I get all the groups that have registered individuals.  However, there may be some groups that have no registered individuals and they should show up as 0, however they don't.

With TOTAL_REGISTERED as 
(select r.regdate, r.Agency
FROM   tblOrgProfile p 

LEFT JOIN tblOrgRegistrations r
ON p.AgencyID = r.AgencyID
and r.fiscal = 2020

 where active = 1 and
 r.agency <> 'Administrator')

select Agency, 
SUM(CASE when regdate >= '7/1/2019' And regdate < '10/01/2019' then 1 end) as [1st Quarter],
SUM(CASE when regdate >= '10/01/2019' And regdate < '01/01/2019' then 1 ELSE 0 end) as [2nd Quarter],
SUM(CASE when regdate >= '01/01/2020' And regdate < '04/01/2020' then 1 ELSE 0 end) as [3rd Quarter],
SUM(CASE when regdate >= '04/01/2020' And regdate < '07/01/2020' then 1 ELSE 0 end) as [4th Quarter]
from TOTAL_REGISTERED T group by Agency order by agency

Open in new window


Please note that the tables attached do not reflect exactly all the data in the actual tables.
tblOrgProfile.xlsx
tblOrgRegistrations.xlsx
0
Q: How to unite interaction columns from R emmeans package dynamically generated in R-Shiny?

I am building an R-Shiny app where I need to wrangle the output from the 'emmeans' package. However, in this interactive environment where many factors may be entered by the user, the single-tibble 'emmeans' output structure will vary with each run depending on the selections made. It could go from having only a single main effect to having multiple 3-way interactions (mixed with main effects and 2-way interactions) arranged in a wide format way.

For instance, assuming the user selects FctrA (with levels A and B) and FctrB (with levels C, D, and E), the interaction FctrA_FctrB will be automatically considered as well. When (~FctrA, ~FctrB, ~FctrA+FctrB) are submitted to 'emmeans', the output tibble is structured as follows:

- the leftmost side of the tibble contains FctrA results (levels, estimates, SE, df, CLs);
- the certermost block contains FctrB results;
- the rightmost side of the tibble contains the interaction results

So far so good except that FctrA levels columns is a single column, FctrB levels column is also a single column, but the interaction portion has its levels split into two columns, one with FctrA and one with FctrB.

The above issue impairs gathering, spreading, stacking of the separate blocks owing to the dimensional discrepancy.

My question is: How can I tell Shiny ('tidyr') to find those split interaction columns and concatenate them …
0
Hi I have a Dell Perc 740p RAID card I just put in a computer, the computer recognizes it but I can't get in with ctrl + R.  I see the post message, but this one dosen't say press ctrl + R to get into Bios.  it says...

"PowerEdge Expandable RAID controller BIOS copyright AVAGO Technologies"

Then Initializing virtual drives, then goes on it's marry way.

Question: is there another way to get into Bios?  Am I dooing something wrong?

Thanks all
0
hi,

I have a study on ETL tools and recently heard a lot of voice on just need to do ETL programming using script/coding, e.g. R and Qview, so is this means now ETL tools like MS SSIS is useless ?

what is the pros and cons on doing ETL logic by coding and ETL tools?

it seems now doing ETL code in container level with RESTFUL API already make ETL process can do load balancing, parallel execution and scale out (by container), is that correct ? so no need ETL tools any more ???

the new MariaDB X3 platform seems can even ignore ETL process as it can stream data directly form OLTP to OLAP, so not need ETL anymore?
0
Hello,

You can see I have commented out a couple of tables.  The  B.EMPLID = '4373198'
here does not have a residency - even with a left outer join he does not appear. What needs to be done for him to appear in the result set?

SELECT DISTINCT B.EMPLID  
 , T.FIRST_NAME_SRCH  
 , T.LAST_NAME_SRCH  
 , B.STRM  
 , B.DESCR  
 , B.CLASS_NBR  
 , B.SUBJECT  
 , B.CATALOG_NBR  
 , B.CLASS_SECTION  
 , B.ENRL_STATUS_REASON  AS STATUS
 , X.XLATSHORTNAME AS ENRL_STATUS_REASON  
 , B.ENRL_ACTN_RSN_LAST AS ActionReasonLastStatus  
  , T.PHONE  
 , U.EMAIL_ADDR  
 , B.ENRL_ADD_DT  
 , B.ENRL_DROP_DT  
 , A.ACCOUNT_BALANCE
  , VW.DESCR
 , VW.REF1_DESCR
 , (  
 SELECT O.COMMENTS  
  FROM PS_PERSON_COMMENT O  
 WHERE B.EMPLID = COMMON_ID  
   AND ADMIN_FUNCTION = 'SFAC'  
   AND CMNT_CATEGORY = 'FYI'  
   AND COMMENT_DT <= GETDATE()  
   AND COMMENTS IS NOT NULL  
   AND SEQ_3C = (  
 SELECT (MAX(SEQ_3C))  
  FROM PS_PERSON_COMMENT O2  
 WHERE O2.COMMON_ID = O.COMMON_ID  
   AND ADMIN_FUNCTION = 'SFAC'  
   AND CMNT_CATEGORY = 'FYI'  
   AND COMMENT_DT <= GETDATE() ))
   --,R.RESIDENCY
  -- ,S.SRVC_IND_CD
  -- ,MAX(SRVC_IND_DTTM)
  FROM PS_CLASS_TBL_SE_VW  B
LEFT OUTER JOIN XLATTABLE_VW X ON B.ENRL_STATUS_REASON = X.FIELDVALUE
LEFT OUTER JOIN PS_PERSONAL_DATA T ON B.EMPLID = T.EMPLID
LEFT OUTER JOIN PS_EMAIL_ADDRESSES U ON B.EMPLID = U.EMPLID  
LEFT OUTER JOIN PS_ACCOUNT_TOT_VW A ON B.EMPLID = A.EMPLID
LEFT OUTER JOIN PS_ITEM_SF_VW VW  …
0
Hi Experts

Could you give me an overall knowledge on how to use R language to obtain data from Facebook ?

Thanks in advance.
0
/usr/local/sbin/smsbox -v 4 /home/admin/web/mysite.com/kannel/kannel.conf
2019-05-29 08:17:42 [2871] [0] PANIC: Failed to open HTTP socket
2019-05-29 08:17:42 [2871] [0] PANIC: /usr/local/sbin/smsbox(gw_panic+0x145) [0x438f05]
2019-05-29 08:17:42 [2871] [0] PANIC: /usr/local/sbin/smsbox(main+0x128d) [0x40e7cd]
2019-05-29 08:17:42 [2871] [0] PANIC: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f7d88b9e445]
2019-05-29 08:17:42 [2871] [0] PANIC: /usr/local/sbin/smsbox() [0x40ead2]
[root@sms-api ~]# /usr/local/sbin/bearerbox -v 4 /home/admin/web/mysite.com/kannel/kannel.conf
2019-05-29 08:18:03 [2872] [3] PANIC: Could not open smsbox port 13001
2019-05-29 08:18:03 [2872] [3] PANIC: /usr/local/sbin/bearerbox(gw_panic+0x145) [0x47d8c5]
2019-05-29 08:18:03 [2872] [3] PANIC: /usr/local/sbin/bearerbox() [0x41b638]
2019-05-29 08:18:03 [2872] [3] PANIC: /usr/local/sbin/bearerbox() [0x47b41f]
2019-05-29 08:18:03 [2872] [3] PANIC: /lib64/libpthread.so.0(+0x7e25) [0x7fe3f9e54e25]
2019-05-29 08:18:03 [2872] [3] PANIC: /lib64/libc.so.6(clone+0x6d) [0x7fe3f8f99bad]
  i run command to see process active and  why this happend.

tcp        0      0 0.0.0.0:2525            0.0.0.0:*               LISTEN      779/exim
tcp        0      0 0.0.0.0:13000           0.0.0.0:*               LISTEN      2182/bearerbox
tcp        0      0 0.0.0.0:13001           0.0.0.0:*               LISTEN      2182/bearerbox
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN   …
0

Statistical Packages

161

Solutions

337

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
>